MDL-25027 Web Service: removed user info(firstname,lastname) truncation for GUI-WS...
authorAparup Banerjee <aparup@moodle.com>
Tue, 21 Feb 2012 06:59:21 +0000 (14:59 +0800)
committerAparup Banerjee <aparup@moodle.com>
Tue, 21 Feb 2012 07:08:15 +0000 (15:08 +0800)
Currently there is no validation on user info (firstname/lastname) in user/editadvanced_form.php

user/externallib.php

index 04ab81a..488568f 100644 (file)
@@ -134,13 +134,10 @@ class core_user_external extends external_api {
                 throw new invalid_parameter_exception('Invalid theme: '.$user['theme']);
             }
 
-            // make sure there is no data loss during truncation
-            $truncated = truncate_userinfo($user);
-            foreach ($truncated as $key=>$value) {
-                    if ($truncated[$key] !== $user[$key]) {
-                        throw new invalid_parameter_exception('Property: '.$key.' is too long: '.$user[$key]);
-                    }
-            }
+            // Start of User info validation.
+            // Lets make sure we validate current user info as handled by current GUI. see user/editadvanced_form.php function validation()
+            // ok, there is no validation currently.
+            // End of user info validation.
 
             $user['confirmed'] = true;
             $user['mnethostid'] = $CFG->mnet_localhost_id;