if( self::recCheckCondition( $cond, $user ) )
$promote[] = $group;
}
- return array_unique( $promote );
+ return $promote;
}
/**
switch( $cond[0] ) {
case APCOND_EMAILCONFIRMED:
if( User::isValidEmailAddr( $user->getEmail() ) ) {
- # FIXME: EMAILCONFIRMED is always true if
- # wgEmailAuthentication if false, this is confusing.
global $wgEmailAuthentication;
if( $wgEmailAuthentication ) {
return $user->getEmailAuthenticationTimestamp() ? true : false;
case APCOND_AGE:
$age = time() - wfTimestampOrNull( TS_UNIX, $user->getRegistration() );
return $age >= $cond[1];
+ case APCOND_INGROUPS:
+ $groups = array_slice( $cond, 1 );
+ return count( array_intersect( $groups, $user->getGroups() ) ) == count( $groups );
default:
$result = null;
wfRunHooks( 'AutopromoteCondition', array( $cond[0], array_slice( $cond, 1 ), $user, &$result ) );