[buddypress-trac] [BuddyPress Trac] #5482: No membership accept/reject buttons for group admins

buddypress-trac noreply at wordpress.org
Sun Apr 13 14:07:29 UTC 2014


#5482: No membership accept/reject buttons for group admins
-------------------------------+------------------------------
 Reporter:  Zsono              |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Groups             |     Version:  1.9.2
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------------------

Comment (by natb19):

 Hi, I've just been playing with a similar problem: (latest BP, latest WP,
 on unix host and local windows xamp servers)

 When a user requests membership to a group, as admin I can't accept the
 request as the buttons do not appear.

 I traced it to the bp_button calls in the groups>single>admin.php in the
 template, and then looking through the code, I found in the BP_Button
 class that it was failing on the check:

 {{{
 if ( true === $this->block_self && is_user_logged_in() &&
 bp_loggedin_user_id() === bp_get_member_user_id() )
 }}}

 I'm not sure exactly why the bp_get_member_user_id function was returning
 my id, but it was, and failing the check. Hence no buttons :(

 As a work around, I just added the template option  block_self => false
 option in the bt_button call:

 {{{
 <?php bp_button( array( 'id' => 'group_membership_accept', 'block_self' =>
 false, 'component' => 'groups', 'wrapper_class' => 'accept', 'link_href'
 => bp_get_group_request_accept_link(), 'link_title' => __( 'Accept',
 'buddypress' ), 'link_text' => __( 'Accept', 'buddypress' ) ) ); ?>
 }}}

 But I'm certainly not sure it's the right thing to do for all cases!

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5482#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list