enable check for casesensitive usernames

This commit is contained in:
Lars Kneschke 2004-01-16 07:44:38 +00:00
parent 1216a5540d
commit 05b73a96b0
3 changed files with 22 additions and 0 deletions

View File

@ -73,6 +73,13 @@
$allValues = ldap_get_entries($ldap, $sri); $allValues = ldap_get_entries($ldap, $sri);
if ($allValues['count'] > 0) 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 */ /* we only care about the first dn */
$userDN = $allValues[0]['dn']; $userDN = $allValues[0]['dn'];
/* /*

View File

@ -55,6 +55,14 @@
. "account_pwd='" . $_passwd . "' AND account_status ='A'",__LINE__,__FILE__); . "account_pwd='" . $_passwd . "' AND account_status ='A'",__LINE__,__FILE__);
$db->next_record(); $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')) if ($db->f('account_lid'))
{ {
$this->previous_login = $db->f('account_lastlogin'); $this->previous_login = $db->f('account_lastlogin');

View File

@ -55,6 +55,13 @@
$db->next_record(); $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')) if($db->f('account_lid'))
{ {
return True; return True;