apply_filters( 'bp_user_can', bool $retval, int $user_id, string $capability, int $site_id, array $args )

Filters whether or not the specified user has a given capability on a given site.

Description

Parameters

$retval

(bool) Whether or not the current user has the capability.

$user_id

(int)

$capability

(string) The capability being checked for.

$site_id

(int) Site ID. Defaults to the BP root blog.

$args

(array) Array of extra arguments passed.

Source

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

Changelog

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