Fixes a few errors.
[platal.git] / include / xorg / session.inc.php
index 70821f1..3437515 100644 (file)
@@ -245,7 +245,7 @@ function start_connexion ($uid, $identified)
                 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,
                 nd.display AS display_name, nd.yourself AS yourself_name,
-                nd.first_name AS prenom, nd.last_name AS nom
+                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')
@@ -290,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->trig("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 "
                        ."<a href='mailto:support@polytechnique.org'>support@polytechnique.org</a>");
             if ($newpage) {
-                $page->run();
+                Platal::page()->run();
             }
             return false;
         }