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:
@@ -3083,8 +3083,10 @@ function user_get_participants_sql($courseid, $groupid = 0, $accesssince = 0, $r
|
||||
$joins = array('FROM {user} u');
|
||||
$wheres = array();
|
||||
|
||||
$userfields = get_extra_user_fields($context);
|
||||
$userfieldssql = user_picture::fields('u', $userfields);
|
||||
// TODO Does not support custom user profile fields (MDL-70456).
|
||||
$userfields = \core\user_fields::get_identity_fields($context, false);
|
||||
$userfieldsapi = \core\user_fields::for_userpic()->including(...$userfields);
|
||||
$userfieldssql = $userfieldsapi->get_sql('u', false, '', '', false)->selects;
|
||||
|
||||
if ($isfrontpage) {
|
||||
$select = "SELECT $userfieldssql, u.lastaccess";
|
||||
|
||||
Reference in New Issue
Block a user