This is a list of known events and parameters; please add to it if
you're going to add events to the MediaWiki code.
+'AbortLogin': Return false to cancel account login.
+$user: the User object being authenticated against
+$password: the password being submitted, not yet checked for validity
+&$retval: a LoginForm class constant to return from authenticateUserData();
+ default is LoginForm::ABORTED. Note that the client may be using
+ a machine API rather than the HTML user interface.
+
'AbortNewAccount': Return false to cancel account creation.
$user: the User object about to be created (read-only, incomplete)
$message: out parameter: error message to display on abort
&$text: string containing partially parsed text
&$this->mStripState: Parser's internal StripState object
+'LoginBadPass': a login attempt has failed with an invalid password.
+ No return data is accepted; this hook is for auditing only.
+$user: the User object being authenticated against
+$password: the password being submitted and found wanting
+
'LogPageValidTypes': action being logged. DEPRECATED: Use $wgLogTypes
&$type: array of strings
const WRONG_PASS = 5;
const EMPTY_PASS = 6;
const RESET_PASS = 7;
+ const ABORTED = 8;
var $mName, $mPassword, $mRetype, $mReturnTo, $mCookieCheck, $mPosted;
var $mAction, $mCreateaccount, $mCreateaccountMail, $mMailmypassword;
$u->load();
}
+ // Give general extensions, such as a captcha, a chance to abort logins
+ $abort = self::ABORTED;
+ if( !wfRunHooks( 'AbortLogin', array( $u, $this->mPassword, &$abort ) ) ) {
+ return $abort;
+ }
+
if (!$u->checkPassword( $this->mPassword )) {
if( $u->checkTemporaryPassword( $this->mPassword ) ) {
// The e-mailed temporary password should not be used
//
return self::RESET_PASS;
} else {
+ wfRunHooks( 'LoginBadPass', array( $u, $this->mPassword ) );
return '' == $this->mPassword ? self::EMPTY_PASS : self::WRONG_PASS;
}
} else {
<form name="userlogin" method="post" action="<?php $this->text('action') ?>">
<h2><?php $this->msg('login') ?></h2>
<p id="userloginlink"><?php $this->html('link') ?></p>
+ <?php $this->html('header'); /* pre-table point for form plugins... */ ?>
<div id="userloginprompt"><?php $this->msgWiki('loginprompt') ?></div>
<?php if( @$this->haveData( 'languages' ) ) { ?><div id="languagelinks"><p><?php $this->html( 'languages' ); ?></p></div><?php } ?>
<table>
padding-top: 0;
}
-div#userlogin .captcha {
+div#userlogin .captcha,
+div#userloginForm .captcha {
border: 1px solid #bbb;
padding: 1.5em 2em;
width: 400px;