Skip to:
Content

BuddyPress.org

Opened 15 years ago

Closed 15 years ago

#3711 closed defect (bug) (fixed)

"Demote to member" button shouldn't show up if you're the only admin of the group

Reported by: r-a-y Owned by:
Priority: normal Milestone: 1.6
Component: Groups Version: 1.5
Severity: normal Keywords: has-patch
Cc: aliso

Description

If there is only one member of a group, that member is the sole group admin.

So under the group "Admin > Members" page, the admin should not see the "Demote to member" button.

Attachments (1)

3711.01.patch (918 bytes ) - added by aliso 15 years ago.

Download all attachments as: .zip

Change History (4)

@aliso
15 years ago

#1 @aliso
15 years ago

  • Cc aliso added
  • Keywords has-patch added; needs-patch removed

This is my first time submitting a patch - woohoo!

I wrapped the demote button in a conditional to make sure the button only gets displayed if there's more than one admin in the group. I used bp_group_admin_ids() to count the number of admins.

#2 @boonebgorges
15 years ago

  • Milestone Awaiting Review1.6

#3 @boonebgorges
15 years ago

  • Resolutionfixed
  • Status newclosed

(In [5545]) Don't show the Demote to Member button on group admin when the group only has one admin.
Fixes #3711
Props aliso

Note: See TracTickets for help on using tickets.