Notifies the user when an email is not valid.
[platal.git] / classes / xorgsession.php
index 55c36ad..e46be2c 100644 (file)
@@ -214,9 +214,13 @@ class XorgSession extends PlSession
                               FROM  auth_user_md5   AS u
                         INNER JOIN  auth_user_quick AS q  USING(user_id)
                          LEFT JOIN  gapps_accounts  AS g  ON (u.user_id = g.l_userid AND g.g_status = 'active')
-                         LEFT JOIN  logger.last_sessions AS ls ON (ls.uid = u.user_id)
-                         LEFT JOIN  logger.sessions AS s  ON(s.id = ls.id)
+                         LEFT JOIN  #logger#.last_sessions AS ls ON (ls.uid = u.user_id)
+                         LEFT JOIN  #logger#.sessions AS s  ON(s.id = ls.id)
                              WHERE  u.user_id = {?} AND u.perms IN('admin', 'user')", $uid);
+        if ($res->numRows() != 1) {
+            return false;
+        }
+
         $sess = $res->fetchOneAssoc();
         $perms = $sess['perms'];
         unset($sess['perms']);
@@ -253,21 +257,6 @@ class XorgSession extends PlSession
         return true;
     }
 
-    /** Start a session without authentication data for the given user.
-     * This is used to identify the user after his registration, to be
-     * removed after rewriting registration procedure.
-     * XXX: Temporary
-     */
-    public function startWeakSession($user)
-    {
-        if (!$this->startSessionAs($user, AUTH_MDP)) {
-            $this->destroy();
-            return false;
-        }
-        S::set('auth', AUTH_MDP);
-        return true;
-    }
-
     private function securityChecks()
     {
         $mail_subject = array();