From d22a68bd18e2eab39eae2bdf5d2d50d0b39a9a9e Mon Sep 17 00:00:00 2001 From: Ankit Agarwal Date: Tue, 13 Mar 2012 13:59:10 +0800 Subject: [PATCH] MDL-28998 libraries: Using default value of 0 for userid during login --- login/signup_form.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;