mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
Merge branch 'MDL-43215_master' of https://github.com/markn86/moodle
This commit is contained in:
commit
3649bcfa21
@ -207,12 +207,14 @@ class web_service_token_form extends moodleform {
|
||||
|
||||
if ($usertotal < 500) {
|
||||
list($sort, $params) = users_order_by_sql('u');
|
||||
//user searchable selector - get all users (admin and guest included)
|
||||
//user must be confirmed, not deleted, not suspended, not guest
|
||||
$sql = "SELECT u.id, u.firstname, u.lastname
|
||||
FROM {user} u
|
||||
WHERE u.deleted = 0 AND u.confirmed = 1 AND u.suspended = 0 AND u.id != :siteguestid
|
||||
ORDER BY $sort";
|
||||
// User searchable selector - return users who are confirmed, not deleted, not suspended and not a guest.
|
||||
$sql = 'SELECT u.id, ' . get_all_user_name_fields(true, 'u') . '
|
||||
FROM {user} u
|
||||
WHERE u.deleted = 0
|
||||
AND u.confirmed = 1
|
||||
AND u.suspended = 0
|
||||
AND u.id != :siteguestid
|
||||
ORDER BY ' . $sort;
|
||||
$params['siteguestid'] = $CFG->siteguest;
|
||||
$users = $DB->get_records_sql($sql, $params);
|
||||
$options = array();
|
||||
|
Loading…
x
Reference in New Issue
Block a user