Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-33876 skip deleted users in enrol_database sync

  • Loading branch information...
commit 4aabce216c424461cf2bcccba270708eaef6fc23 1 parent a5f6ea2
Petr Skoda skodak authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  enrol/database/lib.php
3  enrol/database/lib.php
View
@@ -445,8 +445,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);
Please sign in to comment.
Something went wrong with that request. Please try again.