MDL-54928 notifications: Add username to emailto users
authorDani Palou <dani@moodle.com>
Tue, 5 Jul 2016 08:34:52 +0000 (10:34 +0200)
committerDani Palou <dani@moodle.com>
Tue, 5 Jul 2016 08:34:52 +0000 (10:34 +0200)
user/messageselect.php

index bc1b693..99f2d96 100644 (file)
@@ -97,7 +97,7 @@ if ($data = data_submitted()) {
             if (!array_key_exists($m[2], $SESSION->emailto[$id])) {
                 if ($user = $DB->get_record_select('user', "id = ?", array($m[2]), 'id, '.
                         $namefields . ', idnumber, email, mailformat, lastaccess, lang, '.
-                        'maildisplay, auth, suspended, deleted, emailstop')) {
+                        'maildisplay, auth, suspended, deleted, emailstop, username')) {
                     $SESSION->emailto[$id][$m[2]] = $user;
                     $count++;
                 }