]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10509, LDAP username to be always in lowercase
authortoyomoyo <toyomoyo>
Tue, 6 Nov 2007 01:01:09 +0000 (01:01 +0000)
committertoyomoyo <toyomoyo>
Tue, 6 Nov 2007 01:01:09 +0000 (01:01 +0000)
auth/ldap/auth.php

index 156f7a043ed5535ca9e770a28b9ebccbc010bc83..384157d75c4c1ab21a807fca6388f961ef6b0852 100644 (file)
@@ -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();