Skip to content

Commit

Permalink
MDL-34872 Backup: Backup does not fail when a user is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Massart committed Aug 14, 2012
1 parent 87e9331 commit 9289284
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backup/moodle2/backup_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,7 @@ protected function define_execution() {
'backupid' => $this->get_backupid(), 'itemname' => 'userfinal'));
foreach ($rs as $record) {
$userid = $record->itemid;
$userctx = context_user::instance($userid);
$userctx = context_user::instance($userid, IGNORE_MISSING);
if (!$userctx) {
continue; // User has not context, sure it's a deleted user, so cannot have files
}
Expand Down

0 comments on commit 9289284

Please sign in to comment.