User can have several nicknames.
authorFlorent Bruneau <florent.bruneau@polytechnique.org>
Wed, 21 Jan 2009 13:07:21 +0000 (14:07 +0100)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Wed, 21 Jan 2009 13:07:21 +0000 (14:07 +0100)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
classes/profile.php

index 0f1a796..025521f 100644 (file)
@@ -51,7 +51,8 @@ class Profile
                         LEFT JOIN  profile_name AS pn_uf ON (pn_uf.pid = p.pid AND pn_uf.typeid = ' . self::getNameTypeId('lastname_ordinary', true) . ')
                         LEFT JOIN  profile_name AS pn_ul ON (pn_ul.pid = p.pid AND pn_ul.typeid = ' . self::getNameTypeId('firstname_ordinary', true) . ')
                         LEFT JOIN  profile_name aS pn_n ON (pn_n.pid = p.pid AND pn_n.typeid = ' . self::getNameTypeId('nickname', true) . ')
-                            WHERE  ' . $where);
+                            WHERE  ' . $where . '
+                         GROUP BY  p.pid');
         if ($res->numRows() != 1) {
             __autoload('PlUser');
             throw new UserNotFoundException();