return self::THROTTLED;
}
}
- // If we've enabled it, make it so that a blocked user cannot login
- global $wgBlockDisablesLogin;
- $u = User::newFromName( $this->mName );
- if( $wgBlockDisablesLogin && !is_null( $u ) && $u->isBlocked() ) {
- return self::USER_BLOCKED;
- }
// Load $wgUser now, and check to see if we're logging in as the same
// name. This is necessary because loading $wgUser (say by calling
# TODO: Allow some magic here for invalid external names, e.g., let the
# user choose a different wiki name.
+ $u = User::newFromName( $this->mName );
if( is_null( $u ) || !User::isUsableName( $u->getName() ) ) {
return self::ILLEGAL;
}
return $abort;
}
+ global $wgBlockDisablesLogin;
if (!$u->checkPassword( $this->mPassword )) {
if( $u->checkTemporaryPassword( $this->mPassword ) ) {
// The e-mailed temporary password should not be used for actu-
} else {
$retval = ($this->mPassword == '') ? self::EMPTY_PASS : self::WRONG_PASS;
}
+ } elseif ( $wgBlockDisablesLogin && $u->isBlocked() ) {
+ // If we've enabled it, make it so that a blocked user cannot login
+ $retval = self::USER_BLOCKED;
} else {
$wgAuth->updateUser( $u );
$wgUser = $u;