Skip to content

Commit

Permalink
MDL-28998 libraries: Using default value of 0 for userid during login
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitagarwal authored and Sam Hemelryk committed Mar 13, 2012
1 parent a784430 commit d22a68b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion login/signup_form.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ function validation($data, $files) {
$errors['recaptcha'] = get_string('missingrecaptchachallengefield'); $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 = (object)$data;
$dataobject->id = 0;
$errors += profile_validation($dataobject, $files); $errors += profile_validation($dataobject, $files);


return $errors; return $errors;
Expand Down

0 comments on commit d22a68b

Please sign in to comment.