Skip to content

Commit

Permalink
MDL-25027 Web Service: removed user info(firstname,lastname) truncati…
Browse files Browse the repository at this point in the history
…on for GUI-WS consistency.

Currently there is no validation on user info (firstname/lastname) in user/editadvanced_form.php
  • Loading branch information
Aparup Banerjee committed Feb 21, 2012
1 parent ad52027 commit 758e086
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions user/externallib.php
Expand Up @@ -134,13 +134,10 @@ public static function create_users($users) {
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;
Expand Down

0 comments on commit 758e086

Please sign in to comment.