Static Public Member Functions | |
static | getAutopromoteGroups (User $user) |
Get the groups for the given user based on $wgAutopromote. | |
Static Private Member Functions | |
static | recCheckCondition ($cond, User $user) |
Recursively check a condition. | |
static | checkCondition ($cond, User $user) |
As recCheckCondition, but *not* recursive. |
Definition at line 7 of file Autopromote.php.
static Autopromote::checkCondition | ( | $ | cond, | |
User $ | user | |||
) | [static, private] |
As recCheckCondition, but *not* recursive.
The only valid conditions are those whose first element is APCOND_EMAILCONFIRMED/APCOND_EDITCOUNT/ APCOND_AGE. Other types will throw an exception if no extension evalu- ates them.
$cond | Array: A condition, which must not contain other conditions | |
$user | The user to check the condition against |
Definition at line 90 of file Autopromote.php.
References $result, $wgEmailAuthentication, User::getEditCount(), User::getEmail(), User::getEmailAuthenticationTimestamp(), User::getFirstEditTimestamp(), User::getGroups(), User::getRegistration(), IP::isInRange(), User::isValidEmailAddr(), wfGetIP(), wfRunHooks(), and wfTimestampOrNull().
Referenced by recCheckCondition().
static Autopromote::getAutopromoteGroups | ( | User $ | user | ) | [static] |
Get the groups for the given user based on $wgAutopromote.
$user | The user to get the groups for |
Definition at line 14 of file Autopromote.php.
References $wgAutopromote, and wfRunHooks().
Referenced by User::getEffectiveGroups().
static Autopromote::recCheckCondition | ( | $ | cond, | |
User $ | user | |||
) | [static, private] |
Recursively check a condition.
Conditions are in the form array( '&' or '|' or '^', cond1, cond2, ... ) where cond1, cond2, ... are themselves conditions; *OR* APCOND_EMAILCONFIRMED, *OR* array( APCOND_EMAILCONFIRMED ), *OR* array( APCOND_EDITCOUNT, number of edits ), *OR* array( APCOND_AGE, seconds since registration ), *OR* similar constructs defined by extensions. This function evaluates the former type recursively, and passes off to self::checkCondition for evaluation of the latter type.
$cond | Mixed: a condition, possibly containing other conditions | |
$user | The user to check the conditions against |
Definition at line 43 of file Autopromote.php.
References $res, and checkCondition().