From: Florent Bruneau Date: Fri, 21 Mar 2008 12:30:33 +0000 (+0100) Subject: Fix skin when SUing a user (use the skin of the target user). X-Git-Tag: xorg/0.9.16~94 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=68429b3b2fe970229a04a10f683ba8180da98006;p=platal.git Fix skin when SUing a user (use the skin of the target user). Signed-off-by: Florent Bruneau --- diff --git a/include/xorg/session.inc.php b/include/xorg/session.inc.php index b40e8fa..62f5d30 100644 --- a/include/xorg/session.inc.php +++ b/include/xorg/session.inc.php @@ -317,13 +317,13 @@ function start_connexion ($uid, $identified) function set_skin() { global $globals; - if (S::logged() && !S::has('skin')) { + if (S::logged() && (!S::has('skin') || S::has('suid'))) { $uid = S::v('uid'); - $res = XDB::query("SELECT skin_tpl - FROM auth_user_quick AS a - INNER JOIN skins AS s ON a.skin = s.id - WHERE user_id = {?} AND skin_tpl != ''", $uid); - if ($_SESSION['skin'] = $res->fetchOneCell()) { + $res = XDB::query("SELECT skin_tpl + FROM auth_user_quick AS a + INNER JOIN skins AS s ON a.skin = s.id + WHERE user_id = {?} AND skin_tpl != ''", $uid); + if ($_SESSION['skin'] = $res->fetchOneCell()) { return; } }