X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Fuser.func.inc.php;h=1080c263c329022887b41d746d97e3106082c51d;hb=d0327f6de73e81c4bcc656471ca4161e4f1e1e1b;hp=aca62cdc64b136e01cd128f1c2c72a91fb2a103f;hpb=be6ab042d1dc34d9e42557281b48dd8da400231b;p=platal.git
diff --git a/include/user.func.inc.php b/include/user.func.inc.php
index aca62cd..1080c26 100644
--- a/include/user.func.inc.php
+++ b/include/user.func.inc.php
@@ -1,6 +1,6 @@
fetchColumn();
$user['binets_join'] = join(', ', $user['binets']);
- $res = XDB::iterRow("SELECT text, url
- FROM groupesx_ins
- LEFT JOIN groupesx_def ON groupesx_ins.gid = groupesx_def.id
- WHERE guid = {?}", $uid);
+ $res = XDB::iterRow("SELECT a.diminutif, a.nom, a.site
+ FROM groupex.asso AS a
+ LEFT JOIN groupex.membres AS m ON (m.asso_id = a.id)
+ WHERE m.uid = {?} AND (a.cat = 'GroupesX' OR a.cat = 'Institutions')
+ AND pub = 'public'", $uid);
$user['gpxs'] = Array();
$user['gpxs_name'] = Array();
- while (list($gxt, $gxu) = $res->next()) {
- $user['gpxs'][] = $gxu ? "$gxt" : $gxt;
+ while (list($gxd, $gxt, $gxu) = $res->next()) {
+ if (!$gxu) {
+ $gxu = 'http://www.polytechnique.net/' . $gxd;
+ }
+ $user['gpxs'][] = '$gxd";
$user['gpxs_name'][] = $gxt;
}
$user['gpxs_join'] = join(', ', $user['gpxs']);