]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed notice when restoring a backup file that was created with Users: none.
authortjhunt <tjhunt>
Tue, 5 Dec 2006 18:38:56 +0000 (18:38 +0000)
committertjhunt <tjhunt>
Tue, 5 Dec 2006 18:38:56 +0000 (18:38 +0000)
backup/restorelib.php

index 2aa389d99ce268afcf986500cce8228d49b3f7cd..c7147fda16f917bbc859212cadd6a02774810457 100644 (file)
         foreach ($assignments as $assignment) {
 
             $olduser = backup_getid($restore->backup_unique_code,"user",$assignment->userid);
-            if ($olduser->info == "notincourse") { // it's possible that user is not in the course
+            if (!$olduser || $olduser->info == "notincourse") { // it's possible that user is not in the course
                 continue;  
             }        
             $assignment->userid = $olduser->new_id; // new userid here