From: gustav_delius Date: Thu, 5 Oct 2006 22:45:01 +0000 (+0000) Subject: Incomplete user record (the one where the username is still 'changeme') should not... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6ac0909983322c3beac42c7bca8d87c6637db9ff;p=moodle.git Incomplete user record (the one where the username is still 'changeme') should not be included in user listing. See bug 4570. For some reason this script is not using get_users() but is instead constructing its own sql, so the change to get_users() had to be duplicated here. --- diff --git a/admin/roles/assign.php b/admin/roles/assign.php index b041324183..9953feb50c 100755 --- a/admin/roles/assign.php +++ b/admin/roles/assign.php @@ -182,12 +182,13 @@ if ($roleid) { /// prints a form to swap roles /// Get all existing participants in this context. + // Why is this not done with get_users??? if (!$contextusers = get_role_users($roleid, $context, false, 'u.id, u.firstname, u.lastname, u.email')) { $contextusers = array(); } - $select = "username <> 'guest' AND deleted = 0 AND confirmed = 1"; + $select = "username <> 'guest' AND username <> 'changeme' AND deleted = 0 AND confirmed = 1"; $usercount = count_records_select('user', $select) - count($contextusers);