mycred_exclude_user
Description
Checks if a given user is excluded from using a particular point type.
Available since version 1.0
Returns
(bool) TRUE if the user is excluded else FALSE.
Parameters
| Param | Type | Required | Description | |
|---|---|---|---|---|
function mycred_exclude_user( |
||||
$user_id |
int | Yes | The numeric ID of the user. |
|
$point_type |
string | No | The point type to check for. |
|
) { ... } |
||||
Examples
Example 1: Check if the current user is excluded from the default point type.
$user_id = get_current_user_id();
if ( mycred_exclude_user( $user_id ) ) {
// User is excluded
}