$result['result'] = 'Blocked';
break;
+ case LoginForm::ABORTED:
+ $result['result'] = 'Aborted';
+ $result['reason'] = $this->mAbortLoginErrorMsg;
+ break;
+
default:
ApiBase::dieDebug( __METHOD__, "Unhandled case value: {$authRes}" );
}
var $mAction, $mCreateaccount, $mCreateaccountMail, $mMailmypassword;
var $mLoginattempt, $mRemember, $mEmail, $mDomain, $mLanguage;
var $mSkipCookieCheck, $mReturnToQuery, $mToken, $mStickHTTPS;
+ var $mAbortLoginErrorMsg = 'login-abort-generic';
private $mExtUser = null;
// Give general extensions, such as a captcha, a chance to abort logins
$abort = self::ABORTED;
- if( !wfRunHooks( 'AbortLogin', array( $u, $this->mPassword, &$abort ) ) ) {
+ if( !wfRunHooks( 'AbortLogin', array( $u, $this->mPassword, &$abort, &$this->mAbortLoginErrorMsg ) ) ) {
return $abort;
}
$this->mainLoginForm( wfMsgExt( 'login-userblocked',
array( 'parsemag', 'escape' ), $this->mUsername ) );
break;
+ case self::ABORTED:
+ $this->mainLoginForm( wfMsg( $this->mAbortLoginErrorMsg ) );
+ break;
default:
throw new MWException( 'Unhandled case value' );
}
'usernamehasherror' => 'Username cannot contain hash characters',
'login-throttled' => 'You have made too many recent login attempts.
Please wait before trying again.',
+'login-abort-generic' => 'Your login was unsuccessful - Aborted',
'loginlanguagelabel' => 'Language: $1',
'loginlanguagelinks' => '* Deutsch|de
* English|en
*Parameter $3 is a password (randomly generated).
*Parameter $4 is a URL to the wiki',
'login-throttled' => 'Error message shown at [[Special:UserLogin]] after 5 wrong passwords. The hardcoded waiting time is 300 seconds.',
+'login-abort-generic' => 'The generic unsuccessful login message used unless otherwise specified by hook writers',
# JavaScript password checks
'password-strength' => 'Indicator of [[w:Password strength|password strength]] shown when entering a new password (during user registration or password reset).