diff --git a/login/signup_form.php b/login/signup_form.php index 8edbed4a409..24fe08ecb8d 100644 --- a/login/signup_form.php +++ b/login/signup_form.php @@ -182,8 +182,9 @@ class login_signup_form extends moodleform { $errors['recaptcha'] = get_string('missingrecaptchachallengefield'); } } - // Validate customisable profile fields. (profile_validation expects an object as the parameter) + // Validate customisable profile fields. (profile_validation expects an object as the parameter with userid set) $dataobject = (object)$data; + $dataobject->id = 0; $errors += profile_validation($dataobject, $files); return $errors;