diff --git a/auth/ldap/auth.php b/auth/ldap/auth.php index 1fd39092ba4..447b6a69d7f 100644 --- a/auth/ldap/auth.php +++ b/auth/ldap/auth.php @@ -1385,7 +1385,7 @@ class auth_plugin_ldap extends auth_plugin_base { } } } - $moodleattributes['username'] = $this->config->user_attribute; + $moodleattributes['username'] = moodle_strtolower(trim($this->config->user_attribute)); return $moodleattributes; }