MDL-71099 Lib: Move new user_fields class from core to core_user
This class would belong more appropriately within the 'user' API (core_user) instead of within the 'core' API, since it is directly related to user data. Since the class has only just been added to Moodle, now is a good time to move it.
This commit is contained in:
@@ -1295,7 +1295,7 @@ class completion_info {
|
||||
'moodle/course:isincompletionreports', $groupid, true);
|
||||
|
||||
// TODO Does not support custom user profile fields (MDL-70456).
|
||||
$userfieldsapi = \core\user_fields::for_identity($extracontext, false)->with_name();
|
||||
$userfieldsapi = \core_user\fields::for_identity($extracontext, false)->with_name();
|
||||
$allusernames = $userfieldsapi->get_sql('u')->selects;
|
||||
$sql = 'SELECT u.id, u.idnumber ' . $allusernames;
|
||||
$sql .= ' FROM (' . $enrolledsql . ') eu JOIN {user} u ON u.id = eu.id';
|
||||
|
||||
Reference in New Issue
Block a user