From 6ac0909983322c3beac42c7bca8d87c6637db9ff Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Thu, 5 Oct 2006 22:45:01 +0000 Subject: [PATCH] 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. --- admin/roles/assign.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.39.5