From: Brad Jorsch Date: Wed, 20 Jan 2016 18:26:44 +0000 (-0500) Subject: Only check LoggedOut timestamp on the user loaded from session X-Git-Tag: 1.31.0-rc.0~8272^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=722a7331ad8d98228511f8da38adc7a3c64dd617 Only check LoggedOut timestamp on the user loaded from session This avoids infinite loops when trying to load other User objects, and should still preserve the intent of the timestamp (that being as an invalidation date for client-side caching). Bug: T124143 Change-Id: Ie304cc3839fdc36a1cb2895e26f7700f4b725159 --- diff --git a/includes/user/User.php b/includes/user/User.php index 6ec0ff0071..3a20f1f6ea 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -1085,8 +1085,7 @@ class User implements IDBAccessObject { $this->mOptionOverrides = null; $this->mOptionsLoaded = false; - $request = $this->getRequest(); - $loggedOut = $request ? $request->getSession()->getLoggedOutTimestamp() : 0; + $loggedOut = $this->mRequest ? $this->mRequest->getSession()->getLoggedOutTimestamp() : 0; if ( $loggedOut !== 0 ) { $this->mTouched = wfTimestamp( TS_MW, $loggedOut ); } else {