diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php
index e61d82bf8be..4be36b04440 100644
--- a/apps/user_ldap/settings.php
+++ b/apps/user_ldap/settings.php
@@ -20,7 +20,7 @@
* License along with this library. If not, see
t('Currently the display name field needs to be the same you matched %%uid against in the filter above, because ownCloud doesn\'t distinguish between user id and user name.');?>
>
+>
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 249def7a1c8..0b309fd99d5 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -34,6 +34,7 @@ class OC_USER_LDAP extends OC_User_Backend { protected $ldap_base; protected $ldap_filter; protected $ldap_tls; + protected $ldap_nocase; protected $ldap_display_name; function __construct() { @@ -44,6 +45,7 @@ class OC_USER_LDAP extends OC_User_Backend { $this->ldap_base = OC_Appconfig::getValue('user_ldap', 'ldap_base',''); $this->ldap_filter = OC_Appconfig::getValue('user_ldap', 'ldap_filter',''); $this->ldap_tls = OC_Appconfig::getValue('user_ldap', 'ldap_tls', 0); + $this->ldap_nocase = OC_Appconfig::getValue('user_ldap', 'ldap_nocase', 0); $this->ldap_display_name = OC_Appconfig::getValue('user_ldap', 'ldap_display_name', OC_USER_BACKEND_LDAP_DEFAULT_DISPLAY_NAME); if( !empty($this->ldap_host) @@ -146,7 +148,13 @@ class OC_USER_LDAP extends OC_User_Backend { // TODO ldap_get_entries() seems to lower all keys => needs review $ldap_display_name = strtolower($this->ldap_display_name); if(isset($row[$ldap_display_name])) { - $users[] = $row[$ldap_display_name][0]; + if($this->ldap_nocase) { + $users[] = strtolower($row[$ldap_display_name][0]); + } + else + { + $users[] = $row[$ldap_display_name][0]; + } } } // TODO language specific sorting of user names