From: Florent Bruneau Date: Wed, 21 Jan 2009 13:07:21 +0000 (+0100) Subject: User can have several nicknames. X-Git-Tag: xorg/1.0.0~332^2~408 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=dfcccfc0f277d90e5ef4af1e6b33ef3e1e76d6e2;p=platal.git User can have several nicknames. Signed-off-by: Florent Bruneau --- diff --git a/classes/profile.php b/classes/profile.php index 0f1a796..025521f 100644 --- a/classes/profile.php +++ b/classes/profile.php @@ -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();