Permalink
Browse files

MDL-25027 web service: moved validation to before changes to DB trans…

…action.
  • Loading branch information...
1 parent b6ea277 commit 0feba3f8fa5d93e79532b1ee28f2909521673d80 @nebgor nebgor committed with stronk7 Feb 29, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 user/externallib.php
@@ -134,7 +134,6 @@ public static function create_users($users) {
$user['confirmed'] = true;
$user['mnethostid'] = $CFG->mnet_localhost_id;
- $user['id'] = user_create_user($user);
// 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()
@@ -145,6 +144,8 @@ public static function create_users($users) {
}
// End of user info validation.
+ // create the user data now!
+ $user['id'] = user_create_user($user);
// custom fields
if(!empty($user['customfields'])) {

0 comments on commit 0feba3f

Please sign in to comment.