Permalink
Browse files

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

  • Loading branch information...
1 parent f027027 commit c862e2f45084caa8611db61b9bf4dac74b3e2542 @ankitagarwal ankitagarwal committed with Sam Hemelryk Mar 13, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 login/signup_form.php
View
3 login/signup_form.php
@@ -182,8 +182,9 @@ function validation($data, $files) {
$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;

0 comments on commit c862e2f

Please sign in to comment.