* (bug 2259) Fix old regression where e-mail addresses were no longer
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 13 Dec 2006 23:32:08 +0000 (23:32 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 13 Dec 2006 23:32:08 +0000 (23:32 +0000)
  confirmed on login with mailed password.

RELEASE-NOTES
includes/SpecialUserlogin.php

index 1d104d1..4b2b6ce 100644 (file)
@@ -304,6 +304,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Made the show change size function work on page moves, page creations, and 
   log entries. Also fixed it in the javascript recentchanges.
 * (bug 8239) correctly get 50 new contributions when clicking '(50 next)'
+* (bug 2259) Fix old regression where e-mail addresses were no longer
+  confirmed on login with mailed password.
 
 
 == Languages updated ==
index 29281e6..5a0a571 100644 (file)
@@ -369,10 +369,19 @@ class LoginForm {
                                // people who have been logging in with a temporary
                                // password for some time.
                                //
+                               // As a side-effect, we can authenticate the user's
+                               // e-mail address if it's not already done, since
+                               // the temporary password was sent via e-mail.
+                               //
+                               if( !$u->isEmailConfirmed() ) {
+                                       $u->confirmEmail();
+                               }
+                               
                                // At this point we just return an appropriate code
                                // indicating that the UI should show a password
                                // reset form; bot interfaces etc will probably just
                                // fail cleanly here.
+                               //
                                return self::RESET_PASS;
                        } else {
                                return '' == $this->mPassword ? self::EMPTY_PASS : self::WRONG_PASS;