From: Mark Nelson Date: Tue, 29 Oct 2013 08:41:46 +0000 (+0800) Subject: MDL-42592 mod_chat: passed additional name fields to be used by the fullname function X-Git-Tag: v2.6.0-rc1~153^2 X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=commitdiff_plain;h=2072af6c1dbe706ef8d679c71185ebb133c8fbbd MDL-42592 mod_chat: passed additional name fields to be used by the fullname function --- diff --git a/mod/chat/lib.php b/mod/chat/lib.php index c51d33ee34e..e3ad93d1fac 100644 --- a/mod/chat/lib.php +++ b/mod/chat/lib.php @@ -360,7 +360,8 @@ function chat_print_recent_activity($course, $viewfullnames, $timestart) { $groupselect = ""; } - if (!$users = $DB->get_records_sql("SELECT u.id, u.firstname, u.lastname, u.email, u.picture + $userfields = user_picture::fields('u'); + if (!$users = $DB->get_records_sql("SELECT $userfields FROM {course_modules} cm JOIN {chat} ch ON ch.id = cm.instance JOIN {chat_users} chu ON chu.chatid = ch.id