Follow-up r92887: clear throttle count once the password is accepted as normal
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 22 Jul 2011 22:42:29 +0000 (22:42 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 22 Jul 2011 22:42:29 +0000 (22:42 +0000)
includes/specials/SpecialChangePassword.php

index 3abfa02..ab5aad1 100644 (file)
@@ -225,6 +225,11 @@ class SpecialChangePassword extends SpecialPage {
                        throw new PasswordError( wfMsg( 'resetpass-wrong-oldpass' ) );
                }
 
+               // Please reset throttle for successful logins, thanks!
+               if ( $throttleCount ) {
+                       LoginForm::clearLoginThrottle( $this->mUserName );
+               }
+
                try {
                        $user->setPassword( $this->mNewpass );
                        wfRunHooks( 'PrefsPasswordAudit', array( $user, $newpass, 'success' ) );