Revert r45450, r45451 "(bug 2242) Introduce expiry time for temporary passwords."
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 7 Jan 2009 03:54:29 +0000 (03:54 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 7 Jan 2009 03:54:29 +0000 (03:54 +0000)
<b>Notice</b>:  Undefined variable: wgNewPasswordExpiry in <b>/Library/WebServer/Documents/trunk/includes/User.php</b> on line <b>2710</b><br />

RELEASE-NOTES
includes/DefaultSettings.php
includes/User.php
includes/specials/SpecialUserlogin.php
languages/messages/MessagesEn.php

index b6ccbed..c8f3fd7 100644 (file)
@@ -71,8 +71,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * The 'BeforeWatchlist' hook has been removed due to internal changes in
   Special:Watchlist. 'SpecialWatchlistQuery' should now be used by extensions
   to customize the watchlist database query.
-* Added $wgNewPasswordExpiry, to specify an expiry time (in seconds) to
-  tempoary passwords
+
 
 === Migrated extensions ===
 The following extensions are migrated into MediaWiki 1.14:
@@ -258,7 +257,6 @@ The following extensions are migrated into MediaWiki 1.14:
   move log
 * Image moving is now enabled for sysops by default
 * Make "Did you mean" search feature more noticeable
-* (bug 2242) Add an expiry time to temporary passwords
 * (bug 16720) Transcluded Special:NewPages processes "/username="
 
 === Bug fixes in 1.14 ===
index 18e7b65..f7157b2 100644 (file)
@@ -520,11 +520,6 @@ $wgUserEmailUseReplyTo = false;
  */
 $wgPasswordReminderResendTime = 24;
 
-/**
- * The time, in seconds, when an emailed temporary password expires.
- */
-$wgNewPasswordExpiry  = 3600 * 24 * 7;
-
 /**
  * SMTP Mode
  * For using a direct (authenticated) SMTP server connection.
index 80318a9..9fee089 100644 (file)
@@ -2705,13 +2705,7 @@ class User {
         * @return \bool True if matches, false otherwise
         */
        function checkTemporaryPassword( $plaintext ) {
-               if( self::comparePasswords( $this->mNewpassword, $plaintext, $this->getId() ) ) {
-                       $this->load();
-                       $expiry = wfTimestamp( TS_UNIX, $this->mNewpassTime ) + $wgNewPasswordExpiry;
-                       return ( time() < $expiry );
-               } else {
-                       return false;
-               }
+               return self::comparePasswords( $this->mNewpassword, $plaintext, $this->getId() );
        }
 
        /**
index 1bb54ed..6a4da7a 100644 (file)
@@ -654,7 +654,7 @@ class LoginForm {
         * @private
         */
        function mailPasswordInternal( $u, $throttle = true, $emailTitle = 'passwordremindertitle', $emailText = 'passwordremindertext' ) {
-               global $wgServer, $wgScript, $wgUser, $wgNewPasswordExpiry;
+               global $wgServer, $wgScript, $wgUser;
 
                if ( '' == $u->getEmail() ) {
                        return new WikiError( wfMsg( 'noemail', $u->getName() ) );
@@ -670,8 +670,7 @@ class LoginForm {
                $u->setNewpassword( $np, $throttle );
                $u->saveSettings();
 
-               $m = wfMsgExt( $emailText, array( 'parsemag' ), $ip, $u->getName(), $np,
-                               $wgServer . $wgScript, round( $wgNewPasswordExpiry / 86400 ) );
+               $m = wfMsg( $emailText, $ip, $u->getName(), $np, $wgServer . $wgScript );
                $result = $u->sendMail( wfMsg( $emailTitle ), $m );
 
                return $result;
index bbd6ce4..b52aebe 100644 (file)
@@ -937,7 +937,6 @@ It must have at least {{PLURAL:$1|1 character|$1 characters}} and be different f
 password for {{SITENAME}} ($4). A temporary password for user
 "$2" has been created and was set to "$3". If this was your
 intent, you will need to log in and choose a new password now.
-Your temporary password will expire in {{PLURAL:$5|one day|$5 days}}.
 
 If someone else made this request, or if you have remembered your password,
 and you no longer wish to change it, you may ignore this message and