From: Jure Kajzer Date: Thu, 29 Oct 2009 14:19:05 +0000 (+0000) Subject: Switch to default skin if user session found without persistent creds. Bug 19048 X-Git-Tag: 1.31.0-rc.0~39040 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=03d3a3f4ea02673c120ef2622062450def7fa1d9;p=lhc%2Fweb%2Fwiklou.git Switch to default skin if user session found without persistent creds. Bug 19048 --- diff --git a/includes/User.php b/includes/User.php index 84354142e9..e577dde4b4 100644 --- a/includes/User.php +++ b/includes/User.php @@ -3575,6 +3575,7 @@ class User { } protected function loadOptions() { + global $wgCookiePrefix; $this->load(); if ( $this->mOptionsLoaded || !$this->getId() ) return; @@ -3603,6 +3604,11 @@ class User { $this->mOptionOverrides[$row->up_property] = $row->up_value; $this->mOptions[$row->up_property] = $row->up_value; } + + //null skin if User::mId is loaded out of session data without persistant credentials + if ( !isset( $_SESSION['wsToken'] ) && !isset( $_COOKIE["{$wgCookiePrefix}Token"] ) ) + $this->mOptions['skin'] = null; + } $this->mOptionsLoaded = true;