mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-33876 skip deleted users in enrol_database sync
This commit is contained in:
parent
6be7840ce6
commit
0004317f79
1 changed files with 2 additions and 1 deletions
|
@ -445,8 +445,9 @@ class enrol_database_plugin extends enrol_plugin {
|
|||
$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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue