MDL-45242 Lib: Replace calls to deprecated functions
In all cases changes have been kept to a minimum while not making the code completely horrible. For example, there are many instances where it would probably be better to rewrite a query entirely, but I have not done that (in order to reduce the risk of changes).
This commit is contained in:
+2
-1
@@ -3923,7 +3923,8 @@ function get_role_users($roleid, context $context, $parent = false, $fields = ''
|
||||
global $DB;
|
||||
|
||||
if (empty($fields)) {
|
||||
$allnames = get_all_user_name_fields(true, 'u');
|
||||
$userfieldsapi = \core\user_fields::for_name();
|
||||
$allnames = $userfieldsapi->get_sql('u', false, '', '', false)->selects;
|
||||
$fields = 'u.id, u.confirmed, u.username, '. $allnames . ', ' .
|
||||
'u.maildisplay, u.mailformat, u.maildigest, u.email, u.emailstop, u.city, '.
|
||||
'u.country, u.picture, u.idnumber, u.department, u.institution, '.
|
||||
|
||||
Reference in New Issue
Block a user