Index: trunk/phase3/includes/SpecialUserlogin.php |
— | — | @@ -157,12 +157,12 @@ |
158 | 158 | global $wgLoginLanguageSelector; |
159 | 159 | if( $wgLoginLanguageSelector && $this->mLanguage ) |
160 | 160 | $u->setOption( 'language', $this->mLanguage ); |
161 | | - |
| 161 | + |
162 | 162 | # Save user settings and send out an email authentication message if needed |
163 | 163 | $u->saveSettings(); |
164 | 164 | if( $wgEmailAuthentication && User::isValidEmailAddr( $u->getEmail() ) ) |
165 | 165 | $u->sendConfirmationMail(); |
166 | | - |
| 166 | + |
167 | 167 | # If not logged in, assume the new account as the current one and set session cookies |
168 | 168 | # then show a "welcome" message or a "need cookies" message as needed |
169 | 169 | if( $wgUser->isAnon() ) { |
— | — | @@ -257,6 +257,14 @@ |
258 | 258 | return false; |
259 | 259 | } |
260 | 260 | |
| 261 | + $abortError = ''; |
| 262 | + if( !wfRunHooks( 'AbortNewAccount', array( $u, &$abortError ) ) ) { |
| 263 | + // Hook point to add extra creation throttles and blocks |
| 264 | + wfDebug( "LoginForm::addNewAccountInternal: a hook blocked creation\n" ); |
| 265 | + $this->mainLoginForm( $abortError ); |
| 266 | + return false; |
| 267 | + } |
| 268 | + |
261 | 269 | if ( $wgAccountCreationThrottle ) { |
262 | 270 | $key = wfMemcKey( 'acctcreate', 'ip', $ip ); |
263 | 271 | $value = $wgMemc->incr( $key ); |
— | — | @@ -269,14 +277,6 @@ |
270 | 278 | } |
271 | 279 | } |
272 | 280 | |
273 | | - $abortError = ''; |
274 | | - if( !wfRunHooks( 'AbortNewAccount', array( $u, &$abortError ) ) ) { |
275 | | - // Hook point to add extra creation throttles and blocks |
276 | | - wfDebug( "LoginForm::addNewAccountInternal: a hook blocked creation\n" ); |
277 | | - $this->mainLoginForm( $abortError ); |
278 | | - return false; |
279 | | - } |
280 | | - |
281 | 281 | if( !$wgAuth->addUser( $u, $this->mPassword ) ) { |
282 | 282 | $this->mainLoginForm( wfMsg( 'externaldberror' ) ); |
283 | 283 | return false; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -63,6 +63,8 @@ |
64 | 64 | styling |
65 | 65 | * (bug 6276) Stopped search field from getting too large in Cologne Blue |
66 | 66 | * Fixed duplicate name/id value of "search" in Cologne Blue |
| 67 | +* (bug 7644) User creations that are aborted by hooks shouldn't be counted |
| 68 | + against account creations per day limit |
67 | 69 | |
68 | 70 | == Languages updated == |
69 | 71 | |