MDL-11857 missing addslashes on idnumber field during backup restore

This commit is contained in:
skodak 2007-10-20 19:25:10 +00:00
parent bfe0c0ddcf
commit 549bf9cd73

View File

@ -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");
}