mycred_find_users_rank

Description

Used by the mycred_find_users_rank function, the results of that search is passed through this filter. This allows you to execute custom code when myCRED needs to look if a user gains a new rank.

Available since version 1.5

Parameters

Param Type Required Description
$results obj or bool Yes

The results object or FALSE if no rank was found.

$user_id int No

The ID of the user for whom we requested to find a rank.

$point_type string No

The point type for which the rank is queried. Added in 1.6.

Results Object

Property Type Description
Results Object (
rank_id int The rank ID a user should have.
current_id int The rank ID a user currently have.
minimum int or float The minimum point requirement for the rank the user should have.
maximum int or float The maximum point requirement for the rank the user should have.
ctype string The point type associated with the rank.
)

Used By

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

Examples

Example 1: Reward users with 10 bonus points each time they gain a new rank. Note that this example assumes users only gain rank and do not get demoted. If they do, they will gain points for that as well.