Changes between Initial Version and Version 1 of Ticket #7610, comment 7
- Timestamp:
- 04/08/2018 12:15:36 AM (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #7610, comment 7
initial v1 7 7 4. You'll see the "Request Membership" nav item in the group nav. 8 8 9 The reason why this is happening is super admins, by default, are allowed to do anything and thus the capability check returns `true`.9 The 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`. 10 10 11 By the time, we check for `groups_request_membership`, the return value is already `true`. 11 By the time, we check for `groups_request_membership` when registering the nav item, the return value is already `true` for super admins: 12 https://buddypress.trac.wordpress.org/browser/tags/3.0.0-beta1/src/bp-groups/classes/class-bp-groups-component.php#L619 12 13 13 14 To fix this, we should set the return value to `false` before doing our request membership check.