Fix broken email confirmation expiration caused by MWCryptRand changes.
authorDaniel Friesen <pub-github@nadir-seen-fire.com>
Mon, 26 Mar 2012 03:44:57 +0000 (20:44 -0700)
committerDaniel Friesen <pub-github@nadir-seen-fire.com>
Mon, 26 Mar 2012 03:48:20 +0000 (20:48 -0700)
Change-Id: I7ef0913074f372b5ace3d14993e0e3a914b9f22c

includes/User.php

index 566dcc7..42c58ab 100644 (file)
@@ -3303,11 +3303,12 @@ class User {
                global $wgUserEmailConfirmationTokenExpiry;
                $now = time();
                $expires = $now + $wgUserEmailConfirmationTokenExpiry;
+               $expiration = wfTimestamp( TS_MW, $expires );
                $this->load();
                $token = MWCryptRand::generateHex( 32 );
                $hash = md5( $token );
                $this->mEmailToken = $hash;
-               $this->mEmailTokenExpires = wfTimestamp( TS_MW, $expires );
+               $this->mEmailTokenExpires = $expiration;
                return $token;
        }