MDL-10509, LDAP username to be always in lowercase

This commit is contained in:
toyomoyo
2007-11-06 01:00:27 +00:00
parent 7135ffca51
commit 4e3dad540c
+2 -1
View 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();