]> git.mjollnir.org Git - moodle.git/commitdiff
POssible fix for bug 1109
authormoodler <moodler>
Tue, 9 Mar 2004 08:41:57 +0000 (08:41 +0000)
committermoodler <moodler>
Tue, 9 Mar 2004 08:41:57 +0000 (08:41 +0000)
mod/chat/lib.php

index f1cf18281092154915e51cc359a0a32267f27c2d..5581a4fb78e5f680f1c997c207c918ad652426ab 100644 (file)
@@ -201,12 +201,11 @@ function chat_get_users($chatid, $groupid=0) {
         $groupselect = "";
     }
    
-    return get_records_sql("SELECT u.id, u.firstname, u.lastname, u.picture, c.lastmessageping
+    return get_records_sql("SELECT DISTINCT u.id, u.firstname, u.lastname, u.picture, c.lastmessageping
                               FROM {$CFG->prefix}chat_users c,
                                    {$CFG->prefix}user u
                              WHERE c.chatid = '$chatid'
                                AND u.id = c.userid $groupselect
-                             GROUP BY u.id
                              ORDER BY c.firstping ASC");
 }