MDL-28998 libraries: Using default value of 0 for userid during login

This commit is contained in:
Ankit Agarwal
2012-03-14 10:47:40 +13:00
committed by Sam Hemelryk
parent a784430288
commit d22a68bd18
+2 -1
View File
@@ -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;