mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-25027 web service: moved validation to before changes to DB transaction.
This commit is contained in:
parent
38a9c86fcb
commit
615abdda9f
1 changed files with 2 additions and 1 deletions
|
@ -137,7 +137,6 @@ class core_user_external extends external_api {
|
||||||
|
|
||||||
$user['confirmed'] = true;
|
$user['confirmed'] = true;
|
||||||
$user['mnethostid'] = $CFG->mnet_localhost_id;
|
$user['mnethostid'] = $CFG->mnet_localhost_id;
|
||||||
$user['id'] = user_create_user($user);
|
|
||||||
|
|
||||||
// Start of user info validation.
|
// 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()
|
// 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.
|
// End of user info validation.
|
||||||
|
|
||||||
|
// create the user data now!
|
||||||
|
$user['id'] = user_create_user($user);
|
||||||
|
|
||||||
// custom fields
|
// custom fields
|
||||||
if(!empty($user['customfields'])) {
|
if(!empty($user['customfields'])) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue