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:
+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(get_all_user_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