X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fxorg%2Fsession.inc.php;h=3437515f4cb9b2e821abf08f52c5c102863724b6;hb=0b37833b3b42f608fa0d5864f9d4b2518d9676ae;hp=9ce9c2ff893bba7c62699e68486476659008ea1c;hpb=ef057f1ab0138f1b354bdd12a2089e4321a16f70;p=platal.git diff --git a/include/xorg/session.inc.php b/include/xorg/session.inc.php index 9ce9c2f..3437515 100644 --- a/include/xorg/session.inc.php +++ b/include/xorg/session.inc.php @@ -239,16 +239,18 @@ function try_cookie() function start_connexion ($uid, $identified) { $res = XDB::query(" - SELECT u.user_id AS uid, prenom, prenom_ini, nom, nom_ini, nom_usage, perms, promo, promo_sortie, + SELECT u.user_id AS uid, nom_usage, perms, promo, promo_sortie, matricule, password, FIND_IN_SET('femme', u.flags) AS femme, a.alias AS forlife, a2.alias AS bestalias, q.core_mail_fmt AS mail_fmt, UNIX_TIMESTAMP(q.banana_last) AS banana_last, q.watch_last, q.core_rss_hash, - FIND_IN_SET('watch', u.flags) AS watch_account, q.last_version, g.g_account_name IS NOT NULL AS googleapps + FIND_IN_SET('watch', u.flags) AS watch_account, q.last_version, + nd.display AS display_name, nd.yourself AS yourself_name, + nd.firstname AS prenom, nd.lastname AS nom FROM auth_user_md5 AS u INNER JOIN auth_user_quick AS q USING(user_id) INNER JOIN aliases AS a ON (u.user_id = a.id AND a.type='a_vie') INNER JOIN aliases AS a2 ON (u.user_id = a2.id AND FIND_IN_SET('bestalias',a2.flags)) - LEFT JOIN gapps_accounts AS g ON (u.user_id = g.l_userid AND g.g_status = 'active') + INNER JOIN profile_names_display AS nd ON (u.user_id = nd.user_id) WHERE u.user_id = {?} AND u.perms IN('admin','user')", $uid); $sess = $res->fetchOneAssoc(); $res = XDB::query("SELECT UNIX_TIMESTAMP(s.start) AS lastlogin, s.host @@ -288,18 +290,17 @@ function start_connexion ($uid, $identified) send_warning_mail($mail_subject); $_SESSION = array(); $_SESSION['perms'] = new FlagSet(); - global $page; $newpage = false; - if (!$page) { + if (!Platal::page()) { require_once 'xorg.inc.php'; new_skinned_page('platal/index.tpl'); $newpage = true; } - $page->trigError("Une erreur est survenue lors de la procédure d'authentification. " + Platal::page()->trigError("Une erreur est survenue lors de la procédure d'authentification. " ."Merci de contacter au plus vite " ."support@polytechnique.org"); if ($newpage) { - $page->run(); + Platal::page()->run(); } return false; }