bp_user_has_access()

Returns whether or not a user has access.

Description

Return

(bool)

Source

File: bp-core/bp-core-template.php

1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
function bp_user_has_access() {
    $has_access = bp_current_user_can( 'bp_moderate' ) || bp_is_my_profile();
 
    /**
     * Filters whether or not a user has access.
     *
     * @since BuddyPress 1.2.4
     *
     * @param bool $has_access Whether or not user has access.
     */
    return (bool) apply_filters( 'bp_user_has_access', $has_access );
}

Changelog

Changelog
Version Description
BuddyPress 1.2.4 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.