mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 14:03:52 +01:00
MDL-11857 missing addslashes on idnumber field during backup restore
This commit is contained in:
parent
bfe0c0ddcf
commit
549bf9cd73
@ -2202,16 +2202,7 @@
|
||||
if ($create_user) {
|
||||
//Unset the id because it's going to be inserted with a new one
|
||||
unset ($user->id);
|
||||
//We addslashes to necessary fields
|
||||
$user->username = addslashes($user->username);
|
||||
$user->firstname = addslashes($user->firstname);
|
||||
$user->lastname = addslashes($user->lastname);
|
||||
$user->email = addslashes($user->email);
|
||||
$user->institution = addslashes($user->institution);
|
||||
$user->department = addslashes($user->department);
|
||||
$user->address = addslashes($user->address);
|
||||
$user->city = addslashes($user->city);
|
||||
$user->url = addslashes($user->url);
|
||||
// relink the descriptions
|
||||
$user->description = backup_todb($user->description);
|
||||
|
||||
//We need to analyse the AUTH field to recode it:
|
||||
@ -2244,7 +2235,7 @@
|
||||
|
||||
//We are going to create the user
|
||||
//The structure is exactly as we need
|
||||
$newid = insert_record ("user",$user);
|
||||
$newid = insert_record ("user", addslashes_recursive($user));
|
||||
//Put the new id
|
||||
$status = backup_putid($restore->backup_unique_code,"user",$userid,$newid,"new");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user