fwrite ($bf,start_tag("USER",3,true));
//Output all user data
fwrite ($bf,full_tag("ID",4,false,$user_data->id));
+ fwrite ($bf,full_tag("AUTH",4,false,$user_data->auth));
fwrite ($bf,full_tag("CONFIRMED",4,false,$user_data->confirmed));
fwrite ($bf,full_tag("DELETED",4,false,$user_data->deleted));
fwrite ($bf,full_tag("USERNAME",4,false,$user_data->username));
$user->city = addslashes($user->city);
$user->url = addslashes($user->url);
$user->description = restore_decode_absolute_links(addslashes($user->description));
+
+ //We need to analyse the AUTH field to recode it:
+ // - if the destination site has any kind of INTERNAL authentication,
+ // then apply it to the new user.
+ // - if the destination site has any kind of EXTERNAL authentication,
+ // then leave the original authentication of the user.
+
+ if (is_internal_auth($CFG->auth)) {
+ $user->auth = $CFG->auth;
+ }
+
//We are going to create the user
//The structure is exactly as we need
$newid = insert_record ("user",$user);
$this->info->users[$this->getContents()] = $this->getContents();
$this->info->tempuser->id = $this->getContents();
break;
+ case "AUTH":
+ $this->info->tempuser->auth = $this->getContents();
+ break;
case "CONFIRMED":
$this->info->tempuser->confirmed = $this->getContents();
break;
// database (backup_version) to determine whether upgrades should
// be performed (see db/backup_*.php)
-$backup_version = 2004082500; // The current version is a date (YYYYMMDDXX)
+$backup_version = 2004082800; // The current version is a date (YYYYMMDDXX)
$backup_release = "1.5 development"; // User-friendly version number