Skip to content

Commit

Permalink
MDL-42089 - Administration: Update to sql to include alternate name f…
Browse files Browse the repository at this point in the history
…ields.
  • Loading branch information
abgreeve committed Oct 3, 2013
1 parent d45e65c commit 4d83abd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion admin/roles/assign.php
Expand Up @@ -255,7 +255,8 @@
foreach ($assignableroles as $roleid => $notused) {
$roleusers = '';
if (0 < $assigncounts[$roleid] && $assigncounts[$roleid] <= MAX_USERS_TO_LIST_PER_ROLE) {
$roleusers = get_role_users($roleid, $context, false, 'u.id, u.firstname, u.lastname');
$userfields = 'u.id, u.username, ' . get_all_user_name_fields(true, 'u');
$roleusers = get_role_users($roleid, $context, false, $userfields);
if (!empty($roleusers)) {
$strroleusers = array();
foreach ($roleusers as $user) {
Expand Down
4 changes: 2 additions & 2 deletions lib/adminlib.php
Expand Up @@ -3329,8 +3329,8 @@ function load_choices() {
'This is unexpected, and a problem because there is no way to pass these ' .
'parameters to get_users_by_capability. See MDL-34657.');
}
$users = get_users_by_capability(context_system::instance(),
$this->capability, 'u.id,u.username,u.firstname,u.lastname', $sort);
$userfields = 'u.id, u.username, ' . get_all_user_name_fields(true, 'u');
$users = get_users_by_capability(context_system::instance(), $this->capability, $userfields, $sort);
$this->choices = array(
'$@NONE@$' => get_string('nobody'),
'$@ALL@$' => get_string('everyonewhocan', 'admin', get_capability_string($this->capability)),
Expand Down

0 comments on commit 4d83abd

Please sign in to comment.