bbp_is_user_keymaster( int $user_id )

Checks if user is a keymaster

Description

Parameters

$user_id

(Required)

Return

(bool) True if keymaster, false if not

Source

File: bp-forums/users/capabilities.php

function bbp_is_user_keymaster( $user_id = 0 ) {

	// Default to current user ID if none is passed
	$_user_id = (int) ! empty( $user_id ) ? $user_id : bbp_get_current_user_id();

	// Filter and return
	return (bool) apply_filters( 'bbp_is_user_keymaster', user_can( $_user_id, 'keep_gate' ), $_user_id, $user_id );
}

Changelog

Changelog
Version Description
bbPress (r4783) 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.