MDL-25027 web service: moved validation to before changes to DB transaction.
This commit is contained in:
committed by
Eloy Lafuente (stronk7)
parent
f2a6db61a9
commit
2e2ca2af54
@@ -137,7 +137,6 @@ class core_user_external extends external_api {
|
||||
|
||||
$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()
|
||||
@@ -148,6 +147,8 @@ class core_user_external extends external_api {
|
||||
}
|
||||
// End of user info validation.
|
||||
|
||||
// create the user data now!
|
||||
$user['id'] = user_create_user($user);
|
||||
|
||||
// custom fields
|
||||
if(!empty($user['customfields'])) {
|
||||
|
||||
Reference in New Issue
Block a user