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:
+1
-1
@@ -1102,7 +1102,7 @@ function signup_setup_new_user($user) {
|
||||
$user->secret = random_string(15);
|
||||
$user->auth = $CFG->registerauth;
|
||||
// Initialize alternate name fields to empty strings.
|
||||
$namefields = array_diff(\core\user_fields::get_name_fields(), useredit_get_required_name_fields());
|
||||
$namefields = array_diff(\core_user\fields::get_name_fields(), useredit_get_required_name_fields());
|
||||
foreach ($namefields as $namefield) {
|
||||
$user->$namefield = '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user