Skip to:
Content

BuddyPress.org

Changes between Initial Version and Version 1 of Ticket #7610, comment 7


Ignore:
Timestamp:
04/08/2018 12:15:36 AM (6 years ago)
Author:
r-a-y
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7610, comment 7

    initial v1  
    774. You'll see the "Request Membership" nav item in the group nav.
    88
    9 The reason why this is happening is super admins, by default, are allowed to do anything and thus the capability check returns `true`.
     9The reason why this is happening is super admins, by default, are allowed to do anything and thus the `bp_current_user_can()` capability check returns `true`.
    1010
    11 By the time, we check for `groups_request_membership`, the return value is already `true`.
     11By the time, we check for `groups_request_membership` when registering the nav item, the return value is already `true` for super admins:
     12https://buddypress.trac.wordpress.org/browser/tags/3.0.0-beta1/src/bp-groups/classes/class-bp-groups-component.php#L619
    1213
    1314To fix this, we should set the return value to `false` before doing our request membership check.