diff --git a/admin/settings/users.php b/admin/settings/users.php index 3adbf0b79b2..901a38a9f65 100644 --- a/admin/settings/users.php +++ b/admin/settings/users.php @@ -174,12 +174,11 @@ if ($hassiteconfig // Options include fields from the user table that might be helpful to // distinguish when adding or listing users ('I want to add the John // Smith from Science faculty'). - // Username is not included as an option because in some sites, it might - // be a security problem to reveal usernames even to trusted staff. // Custom user profile fields are not currently supported. $temp->add(new admin_setting_configmulticheckbox('showuseridentity', new lang_string('showuseridentity', 'admin'), new lang_string('showuseridentity_desc', 'admin'), array('email' => 1), array( + 'username' => new lang_string('username'), 'idnumber' => new lang_string('idnumber'), 'email' => new lang_string('email'), 'phone1' => new lang_string('phone1'), @@ -255,4 +254,4 @@ if ($hassiteconfig) { new lang_string('sitepolicyguest_help', 'core_admin'), (isset($CFG->sitepolicy) ? $CFG->sitepolicy : ''), PARAM_RAW)); $ADMIN->add('privacy', $temp); -} \ No newline at end of file +} diff --git a/enrol/renderer.php b/enrol/renderer.php index 32c5c10c30c..4d313c3d93e 100644 --- a/enrol/renderer.php +++ b/enrol/renderer.php @@ -353,7 +353,8 @@ class course_enrolment_table extends html_table implements renderable { * @var array */ protected static $sortablefields = array('firstname', 'lastname', 'firstnamephonetic', 'lastnamephonetic', 'middlename', - 'alternatename', 'idnumber', 'email', 'phone1', 'phone2', 'institution', 'department', 'lastaccess', 'lastcourseaccess' ); + 'alternatename', 'username', 'idnumber', 'email', 'phone1', 'phone2', + 'institution', 'department', 'lastaccess', 'lastcourseaccess'); /** * Constructs the table