Now user->auth is in backup & restore

Bug 1789
(http://moodle.org/bugs/bug.php?op=show&bugid=1789)

Merged from MOODLE_14_STABLE
This commit is contained in:
stronk7
2004-08-28 10:26:06 +00:00
parent 6acfbb4303
commit 0083049b21
3 changed files with 16 additions and 1 deletions
+1
View File
@@ -720,6 +720,7 @@
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));
+14
View File
@@ -808,6 +808,17 @@
$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);
@@ -2427,6 +2438,9 @@
$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;
+1 -1
View File
@@ -5,6 +5,6 @@
// 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