apply_filters_ref_array( 'bp_group_user_has_access', bool $user_has_access, array $no_access_args )

Allow plugins to filter whether the current user has access to this group content.


Note that if a plugin sets $user_has_access to false, it may also want to change the $no_access_args, to avoid problems such as logged-in users being redirected to wp-login.php.



(bool) True if the user has access to the content, otherwise false.


(array) Arguments to be passed to bp_core_no_access() in case of no access. Note that this value is passed by reference, so it can be modified by the filter callback.


File: bp-groups/actions/access.php


Version Description
BuddyPress 2.1.0 Introduced.


We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.