From: Daniel Friesen Date: Mon, 26 Mar 2012 03:44:57 +0000 (-0700) Subject: Fix broken email confirmation expiration caused by MWCryptRand changes. X-Git-Tag: 1.31.0-rc.0~24130 X-Git-Url: http://git.cyclocoop.org//%22%22.str_replace%28%27%22%27%2C?a=commitdiff_plain;h=73d5d7a2265c9b0936ee26cb8fe8af0610d9375b;p=lhc%2Fweb%2Fwiklou.git Fix broken email confirmation expiration caused by MWCryptRand changes. Change-Id: I7ef0913074f372b5ace3d14993e0e3a914b9f22c --- diff --git a/includes/User.php b/includes/User.php index 566dcc7407..42c58ab6c5 100644 --- a/includes/User.php +++ b/includes/User.php @@ -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; }