mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MFC: MDL-11857 missing addslashes on idnumber field during backup restore
This commit is contained in:
parent
60b5a1e50a
commit
ee9568e574
1 changed files with 2 additions and 11 deletions
|
@ -1588,16 +1588,7 @@
|
||||||
if ($create_user) {
|
if ($create_user) {
|
||||||
//Unset the id because it's going to be inserted with a new one
|
//Unset the id because it's going to be inserted with a new one
|
||||||
unset ($user->id);
|
unset ($user->id);
|
||||||
//We addslashes to necessary fields
|
// relink the descriptions
|
||||||
$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);
|
|
||||||
$user->description = restore_decode_absolute_links(addslashes($user->description));
|
$user->description = restore_decode_absolute_links(addslashes($user->description));
|
||||||
|
|
||||||
//We need to analyse the AUTH field to recode it:
|
//We need to analyse the AUTH field to recode it:
|
||||||
|
@ -1630,7 +1621,7 @@
|
||||||
|
|
||||||
//We are going to create the user
|
//We are going to create the user
|
||||||
//The structure is exactly as we need
|
//The structure is exactly as we need
|
||||||
$newid = insert_record ("user",$user);
|
$newid = insert_record ("user", addslashes_recursive($user));
|
||||||
//Put the new id
|
//Put the new id
|
||||||
$status = backup_putid($restore->backup_unique_code,"user",$userid,$newid,"new");
|
$status = backup_putid($restore->backup_unique_code,"user",$userid,$newid,"new");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue