Permalink
Browse files

MDL-33876 skip deleted users in enrol_database sync

  • Loading branch information...
1 parent 8e12fde commit 90048d3cbae65b8aac2d5f1497c167f2f633904b @skodak skodak committed with stronk7 Jun 30, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 enrol/database/lib.php
View
@@ -410,8 +410,9 @@ public function sync_enrolments($verbose = false) {
$sql = $this->db_get_sql($table, array($coursefield=>$course->mapping), $sqlfields);
if ($rs = $extdb->Execute($sql)) {
if (!$rs->EOF) {
+ $usersearch = array('deleted' => 0);
if ($localuserfield === 'username') {
- $usersearch = array('mnethostid'=>$CFG->mnet_localhost_id, 'deleted' =>0);
+ $usersearch['mnethostid'] = $CFG->mnet_localhost_id;
}
while ($fields = $rs->FetchRow()) {
$fields = array_change_key_case($fields, CASE_LOWER);

0 comments on commit 90048d3

Please sign in to comment.