Convert miniwiki of the freetext to text in the vcards.
[platal.git] / include / xorg / session.inc.php
index 34581a1..9ce9c2f 100644 (file)
@@ -243,11 +243,12 @@ function start_connexion ($uid, $identified)
                 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
+                FIND_IN_SET('watch', u.flags) AS watch_account, q.last_version, g.g_account_name IS NOT NULL AS googleapps
           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')
          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