Skip to content

Commit

Permalink
MDL-41144 enrol_flatfile: ignore deleted users.
Browse files Browse the repository at this point in the history
  • Loading branch information
danmarsden committed Aug 15, 2013
1 parent 838d78a commit a4aaeea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions enrol/flatfile/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,8 @@ protected function process_file(progress_trace $trace) {
}
$roleid = $rolemap[$fields[1]];

if (empty($fields[2]) or !$user = $DB->get_record("user", array("idnumber"=>$fields[2]))) {
$trace->output("Unknown user idnumber in field 3 - ignoring line $line", 1);
if (empty($fields[2]) or !$user = $DB->get_record("user", array("idnumber"=>$fields[2], 'deleted'=>0))) {
$trace->output("Unknown user idnumber or deleted user in field 3 - ignoring line $line", 1);
continue;
}

Expand Down

0 comments on commit a4aaeea

Please sign in to comment.