return;
}
+ /** @var User $u */
$u = $status->getValue();
// Wipe the initial password and mail a temporary one
$cache = ObjectCache::getLocalClusterInstance();
# Make sure the user does not exist already
- $lock = $cache->getScopedLock( wfGlobalCacheKey( 'account', md5( $this->mUsername ) ) );
+ $lock = $cache->getScopedLock( $cache->makeGlobalKey( 'account', md5( $this->mUsername ) ) );
if ( !$lock ) {
return Status::newFatal( 'usernameinprogress' );
} elseif ( $u->idForName( User::READ_LOCKING ) ) {
// Give general extensions, such as a captcha, a chance to abort logins
$abort = self::ABORTED;
if ( !Hooks::run( 'AbortLogin', array( $u, $this->mPassword, &$abort, &$msg ) ) ) {
- if ( !in_array( $abort, self::$statusCodes, true ) ) {
+ if ( !in_array( $abort, array_keys( self::$statusCodes ), true ) ) {
throw new Exception( 'Invalid status code returned from AbortLogin hook: ' . $abort );
}
$this->mAbortLoginErrorMsg = $msg;