From: stronk7 Date: Fri, 30 Jan 2009 13:19:19 +0000 (+0000) Subject: MDL-18066 import_backup_file_silently - reverting last commit. Merged from 19_STABLE X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8f7bd455d5762a4aa3af609e3c11650b09051a07;p=moodle.git MDL-18066 import_backup_file_silently - reverting last commit. Merged from 19_STABLE --- diff --git a/backup/lib.php b/backup/lib.php index f7ee0657df..2972570803 100644 --- a/backup/lib.php +++ b/backup/lib.php @@ -497,7 +497,7 @@ function import_backup_file_silently($pathtofile,$destinationcourse,$emptyfirst=false,$userdata=false, $preferences=array()) { global $CFG,$SESSION,$USER, $DB; // is there such a thing on cron? I guess so.. global $restore; // ick - if (empty($USER) || empty($USER->id)) { + if (empty($USER)) { session_set_user(get_admin()); $USER->admin = 1; // not sure why, but this doesn't get set }