print names for members from x.net
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Wed, 27 Apr 2005 17:01:04 +0000 (17:01 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:28:46 +0000 (23:28 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-595

include/lists.inc.php

index bd72b70..8582278 100644 (file)
@@ -55,7 +55,13 @@ function list_sort_owners(&$members, $tri_promo = true) {
                 $key = $tri_promo ? $promo : strtoupper($nom{0});
                 $membres[$key][$nom.$m] = Array('n' => "$prenom $nom", 'l' => $m);
             } else {
-                $membres[0][] = Array('l' => $mem);
+                $res = $globals->xdb->query('SELECT prenom, nom FROM groupex.membres WHERE email={?}', $mem);
+                if (list($prenom, $nom) = $res->fetchOneRow()) {
+                    $key = $tri_promo ? 0 : strtoupper($nom{0});
+                    $membres[$key][$nom.$m] = Array('n' => "$prenom $nom", 'l' => $m);
+                } else {
+                    $membres[0][] = Array('l' => $mem);
+                }
             }
         } else {
             $membres[0][] = Array('l' => $mem);