MDL-28998 libraries: Adding validation to customisable profile fields during signup
authorAnkit Agarwal <ankit@moodle.com>
Thu, 1 Mar 2012 01:05:27 +0000 (09:05 +0800)
committerAnkit Agarwal <ankit@moodle.com>
Fri, 9 Mar 2012 06:48:36 +0000 (14:48 +0800)
login/signup_form.php

index ed1e73c..8edbed4 100644 (file)
@@ -182,6 +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)
+        $dataobject = (object)$data;
+        $errors += profile_validation($dataobject, $files);
 
         return $errors;