mycred_exclude_user

Codex / mycred/core / Functions / mycred_exclude_user

Navigation:

  1. Description
  2. Usage
  3. Parameters
  4. Return

Description

Checks if a given user should be excluded. These are either users who are in the exclude list or if “Exclude Plugin Editors” or “Exclude Creds Editors” are set to true.

Note! This function does not check if a user is logged in or not, it assumes you either present a user id or the current user id can be retrieved.

 

Usage

<?php
if ( mycred_exclude_user( $user_id ) ) {
	// User should be excluded
}

 

Parameters

  • user_id (int)
    User id to check. If not set, the current user is checked.

 

Return

Returns true or false.

Last edited March 5, 2016