From: moodler Date: Tue, 7 Oct 2003 14:01:23 +0000 (+0000) Subject: Not having any users in a backup is not necessarily an error. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e23defdb12bd19d9ab841afd1298363b866707fa;p=moodle.git Not having any users in a backup is not necessarily an error. --- diff --git a/backup/restorelib.php b/backup/restorelib.php index b5e47a56d0..fe03f7c0f3 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -487,8 +487,8 @@ //Now, get evey user_id from $info and user data from $backup_ids //and create the necessary records (users, user_students, user_teachers //user_course_creators and user_admins - if ($info) { - //For each, user, take its info from backup_ids + if (!empty($info->users)) { + //For each user, take its info from backup_ids foreach ($info->users as $userid) { $rec = backup_getid($restore->backup_unique_code,"user",$userid); $user = $rec->info; @@ -625,8 +625,6 @@ } } } - } else { - $status = false; } return $status;