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:
@@ -879,8 +879,9 @@ class external extends external_api {
|
||||
$USER->id, SQL_PARAMS_NAMED);
|
||||
|
||||
// TODO Does not support custom user profile fields (MDL-70456).
|
||||
$extrasearchfields = \core\user_fields::get_identity_fields($context, false);
|
||||
$fields = \user_picture::fields('u', $extrasearchfields);
|
||||
$userfieldsapi = \core\user_fields::for_identity($context, false)->with_userpic();
|
||||
$fields = $userfieldsapi->get_sql('u', false, '', '', false)->selects;
|
||||
$extrasearchfields = $userfieldsapi->get_required_fields([\core\user_fields::PURPOSE_IDENTITY]);
|
||||
|
||||
list($wheresql, $whereparams) = users_search_sql($query, 'u', true, $extrasearchfields);
|
||||
list($sortsql, $sortparams) = users_order_by_sql('u', $query, $context);
|
||||
|
||||
Reference in New Issue
Block a user