From 4e3dad540ce1e9ac8401bff365981ddabd388f7b Mon Sep 17 00:00:00 2001 From: toyomoyo Date: Tue, 6 Nov 2007 01:00:27 +0000 Subject: [PATCH] MDL-10509, LDAP username to be always in lowercase --- auth/ldap/auth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php index 156f7a043ed..384157d75c4 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -569,7 +569,8 @@ class auth_plugin_ldap extends auth_plugin_base { do { $value = ldap_get_values_len($ldapconnection, $entry, $this->config->user_attribute); $value = $textlib->convert($value[0], $this->config->ldapencoding, 'utf-8'); - array_push($fresult, $value); + // usernames are __always__ lowercase. + array_push($fresult, moodle_strtolower($value)); if (count($fresult) >= $bulk_insert_records) { $this->ldap_bulk_insert($fresult, $temptable); $fresult = array();