(bug 7644) User creations that are aborted by hooks shouldn't be counted against account creations per day limit
This commit is contained in:
parent
fdbb6fa8ad
commit
f3b50f965d
2 changed files with 12 additions and 10 deletions
|
|
@ -63,6 +63,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
|
|||
styling
|
||||
* (bug 6276) Stopped search field from getting too large in Cologne Blue
|
||||
* Fixed duplicate name/id value of "search" in Cologne Blue
|
||||
* (bug 7644) User creations that are aborted by hooks shouldn't be counted
|
||||
against account creations per day limit
|
||||
|
||||
== Languages updated ==
|
||||
|
||||
|
|
|
|||
|
|
@ -157,12 +157,12 @@ class LoginForm {
|
|||
global $wgLoginLanguageSelector;
|
||||
if( $wgLoginLanguageSelector && $this->mLanguage )
|
||||
$u->setOption( 'language', $this->mLanguage );
|
||||
|
||||
|
||||
# Save user settings and send out an email authentication message if needed
|
||||
$u->saveSettings();
|
||||
if( $wgEmailAuthentication && User::isValidEmailAddr( $u->getEmail() ) )
|
||||
$u->sendConfirmationMail();
|
||||
|
||||
|
||||
# If not logged in, assume the new account as the current one and set session cookies
|
||||
# then show a "welcome" message or a "need cookies" message as needed
|
||||
if( $wgUser->isAnon() ) {
|
||||
|
|
@ -257,6 +257,14 @@ class LoginForm {
|
|||
return false;
|
||||
}
|
||||
|
||||
$abortError = '';
|
||||
if( !wfRunHooks( 'AbortNewAccount', array( $u, &$abortError ) ) ) {
|
||||
// Hook point to add extra creation throttles and blocks
|
||||
wfDebug( "LoginForm::addNewAccountInternal: a hook blocked creation\n" );
|
||||
$this->mainLoginForm( $abortError );
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( $wgAccountCreationThrottle ) {
|
||||
$key = wfMemcKey( 'acctcreate', 'ip', $ip );
|
||||
$value = $wgMemc->incr( $key );
|
||||
|
|
@ -269,14 +277,6 @@ class LoginForm {
|
|||
}
|
||||
}
|
||||
|
||||
$abortError = '';
|
||||
if( !wfRunHooks( 'AbortNewAccount', array( $u, &$abortError ) ) ) {
|
||||
// Hook point to add extra creation throttles and blocks
|
||||
wfDebug( "LoginForm::addNewAccountInternal: a hook blocked creation\n" );
|
||||
$this->mainLoginForm( $abortError );
|
||||
return false;
|
||||
}
|
||||
|
||||
if( !$wgAuth->addUser( $u, $this->mPassword ) ) {
|
||||
$this->mainLoginForm( wfMsg( 'externaldberror' ) );
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue