Codex / mycred/core / Filters / mycred_exclude_user


This filter allows you to exclude users from using myCRED via script. This filter is part of the exclude_user() method in the myCRED_Settings class and is used extensively in myCRED. Returning true will stop the user in question from gaining points or using myCRED features.

Available since version 1.0


Param Type Required Description
$exclude bool Yes

Should return TRUE if user is to be excluded or FALSE if not.

$user_id int No

The ID of the user in question.

$mycred obj No

The myCRED_Settings class object being used.

Used By

Package Prio. Description
Not used by any built-in package.


Example 1: Exclude users with the subscriber role in WordPress from using myCRED.

Example 2: Example 2: Exclude users with the Paid Membership Pro level of ``Gold`` from using myCRED.

Last edited June 24, 2016