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.

Description

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.

Parameters

$user_has_access

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

$no_access_args

(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.

Source

File: bp-groups/actions/access.php

Changelog

Changelog
Version Description
BuddyPress 2.1.0 Introduced.

Questions?

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.