* Send new password e-mail in users preference language
authorRaimond Spekking <raymond@users.mediawiki.org>
Sun, 10 Jan 2010 10:40:12 +0000 (10:40 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Sun, 10 Jan 2010 10:40:12 +0000 (10:40 +0000)
RELEASE-NOTES
includes/specials/SpecialUserlogin.php

index 11434aa..c06667d 100644 (file)
@@ -295,6 +295,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   equivalents.
 * (bug 22051) Returing false in SpecialContributionsBeforeMainOutput hook now
   stops normal output
+* Send new password e-mail in users preference language
 
 === Bug fixes in 1.16 ===
 
index a13a3a6..5e8e3d8 100644 (file)
@@ -727,10 +727,10 @@ class LoginForm {
                $np = $u->randomPassword();
                $u->setNewpassword( $np, $throttle );
                $u->saveSettings();
-
-               $m = wfMsgExt( $emailText, array( 'parsemag' ), $ip, $u->getName(), $np,
+               $userLanguage = $u->getOption( 'language' );
+               $m = wfMsgExt( $emailText, array( 'parsemag', 'language' => $userLanguage ), $ip, $u->getName(), $np,
                                $wgServer . $wgScript, round( $wgNewPasswordExpiry / 86400 ) );
-               $result = $u->sendMail( wfMsg( $emailTitle ), $m );
+               $result = $u->sendMail( wfMsgExt( $emailTitle, array( 'parsemag', 'language' => $userLanguage ) ), $m );
 
                return $result;
        }