MDL-50092 enrol_imsenterprise: Fixing wrong field name
authorDavid Monllao <davidm@moodle.com>
Mon, 11 May 2015 06:51:02 +0000 (14:51 +0800)
committerDavid Monllao <davidm@moodle.com>
Mon, 11 May 2015 06:55:02 +0000 (14:55 +0800)
Thanks to JD for the fix.

enrol/imsenterprise/lib.php

index bc68f99..56c4d06 100644 (file)
@@ -464,7 +464,7 @@ class enrol_imsenterprise_plugin extends enrol_plugin {
 
             if ($imsdeleteusers) { // If we're allowed to delete user records.
                 // Do not dare to hack the user.deleted field directly in database!!!
-                $params = array('username' => $person->username, 'mnethostid' => $CFG->mnet_localhost_id, 'deleted ' => 0);
+                $params = array('username' => $person->username, 'mnethostid' => $CFG->mnet_localhost_id, 'deleted' => 0);
                 if ($user = $DB->get_record('user', $params)) {
                     if (delete_user($user)) {
                         $this->log_line("Deleted user '$person->username' (ID number $person->idnumber).");