Merge branch 'w27_MDL-33876_m23_delenrol' of git://github.com/skodak/moodle into MOODLE_23_STABLE

This commit is contained in:
Eloy Lafuente (stronk7)
2012-07-04 04:16:05 +02:00
+2 -1
View File
@@ -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);