From c862e2f45084caa8611db61b9bf4dac74b3e2542 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 0a11f9e8796..ec230c1be6b 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; -- 2.11.4.GIT