diff --git a/phpgwapi/inc/class.auth_ldap.inc.php b/phpgwapi/inc/class.auth_ldap.inc.php index d5b821ec48..46525806ab 100644 --- a/phpgwapi/inc/class.auth_ldap.inc.php +++ b/phpgwapi/inc/class.auth_ldap.inc.php @@ -73,6 +73,13 @@ $allValues = ldap_get_entries($ldap, $sri); if ($allValues['count'] > 0) { + if($GLOBALS['phpgw_info']['server']['case_sensitive_username'] == true) + { + if($allValues[0]['uid'][0] != $username) + { + return false; + } + } /* we only care about the first dn */ $userDN = $allValues[0]['dn']; /* diff --git a/phpgwapi/inc/class.auth_sql.inc.php b/phpgwapi/inc/class.auth_sql.inc.php index 92364d56c8..6023547026 100644 --- a/phpgwapi/inc/class.auth_sql.inc.php +++ b/phpgwapi/inc/class.auth_sql.inc.php @@ -55,6 +55,14 @@ . "account_pwd='" . $_passwd . "' AND account_status ='A'",__LINE__,__FILE__); $db->next_record(); + if($GLOBALS['phpgw_info']['server']['case_sensitive_username'] == true) + { + if($db->f('account_lid') != $username) + { + return false; + } + } + if ($db->f('account_lid')) { $this->previous_login = $db->f('account_lastlogin'); diff --git a/phpgwapi/inc/class.auth_sqlssl.inc.php b/phpgwapi/inc/class.auth_sqlssl.inc.php index 8948e0600b..dd4cd5ac6c 100644 --- a/phpgwapi/inc/class.auth_sqlssl.inc.php +++ b/phpgwapi/inc/class.auth_sqlssl.inc.php @@ -55,6 +55,13 @@ $db->next_record(); } + if($GLOBALS['phpgw_info']['server']['case_sensitive_username'] == true) + { + if($db->f('account_lid') != $username) + { + return false; + } + } if($db->f('account_lid')) { return True;