mycred_get_users_of_rank

Codex / / Functions / mycred_get_users_of_rank

Navigation:

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

Description

Returns an array of User IDs for a given rank title or rank id.

 

Usage

$newbies = mycred_get_users_of_rank( 'Newbie' );
echo 'There are ' . count( $newbies ) . ' Newbies';

 

Parameters

  • rank (int|string) Required
    Either the rank ID or rank title.
  • number (int)
    Number of users to return. Defaults to all.
  • order (string)
    Option to select the order in which the users are returned. Defaults to ‘DESC’ showing the users with the highest amount first.

 

Return

  • Array of users IDs in order of balance.
  • Empty string if if the given rank is not found.
  • Empty array if no users are found.

Last edited July 2, 2014