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:
@@ -252,10 +252,10 @@ class core_user {
|
||||
$extraparams = [];
|
||||
|
||||
// TODO Does not support custom user profile fields (MDL-70456).
|
||||
$userfieldsapi = \core\user_fields::for_identity(null, false)->with_userpic()->with_name()
|
||||
$userfieldsapi = \core_user\fields::for_identity(null, false)->with_userpic()->with_name()
|
||||
->including('username', 'deleted');
|
||||
$selectfields = $userfieldsapi->get_sql('u', false, '', '', false)->selects;
|
||||
$extra = $userfieldsapi->get_required_fields([\core\user_fields::PURPOSE_IDENTITY]);
|
||||
$extra = $userfieldsapi->get_required_fields([\core_user\fields::PURPOSE_IDENTITY]);
|
||||
|
||||
$index = 1;
|
||||
foreach ($extra as $fieldname) {
|
||||
|
||||
Reference in New Issue
Block a user