From 8d092434edcabbede56feaf1be925e7d88d8aee2 Mon Sep 17 00:00:00 2001
From: Insanemal <insanemal@gmail.com>
Date: Mon, 21 Nov 2011 20:20:26 +1000
Subject: [PATCH] Adjusted the check user function to lowercase the return.

Signed-off-by: Insanemal <insanemal@gmail.com>
---
 apps/user_ldap/user_ldap.php | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index 0b309fd99d..d35cefcaae 100644
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -115,7 +115,14 @@ class OC_USER_LDAP extends OC_User_Backend {
 
 		if (!@ldap_bind( $this->getDs(), $dn, $password ))
 			return false;
-		return $uid;
+		
+		if($this->ldap_nocase) {
+			return strtolower($uid);
+		}
+		else {
+			return $uid;
+		}
+		
 	}
 
 	public function userExists( $uid ) {
-- 
GitLab