Permalink
Browse files

MDL-10509, LDAP username to be always in lowercase

  • Loading branch information...
toyomoyo
toyomoyo committed Nov 6, 2007
1 parent 15fbde6 commit e967dcc1a7fede0368d02c88c88d26c8fda45e0d
Showing with 2 additions and 1 deletion.
  1. +2 −1 auth/ldap/auth.php
View
@@ -431,7 +431,8 @@ function sync_users ($bulk_insert_records = 1000, $do_updates = true) {
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();

0 comments on commit e967dcc

Please sign in to comment.