From: danstowell Date: Thu, 6 Jul 2006 13:13:42 +0000 (+0000) Subject: Change to make LDAP enroller simply ignore accounts with blank idnumber - see moodle... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6d19caab414b0015d780a9808ac5e037397b8e07;p=moodle.git Change to make LDAP enroller simply ignore accounts with blank idnumber - see moodle.org discussion with Inaki --- diff --git a/enrol/ldap/enrol.php b/enrol/ldap/enrol.php index 0664da8f57..93bc7115d9 100755 --- a/enrol/ldap/enrol.php +++ b/enrol/ldap/enrol.php @@ -485,6 +485,10 @@ function find_ext_enrolments ($ldap_connection, $memberuid, $type){ global $CFG; + if(empty($memberuid)) { // No "idnumber" stored for this user, so no LDAP enrolments + return array(); + } + //default return value $courses = array(); $this->enrol_ldap_bind($ldap_connection);