From: cajus Date: Wed, 31 Oct 2007 09:30:01 +0000 (+0000) Subject: Made mail address non case sensitive X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a4f91477ed1ea8189d88ebcae392be1c8be4a775;p=gosa.git Made mail address non case sensitive git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7696 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/functions.inc b/include/functions.inc index cc724f8a6..dab51ac86 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -314,7 +314,7 @@ function ldap_login_user ($username, $password) /* Check if mail address is also a valid auth name */ $auth_mail = FALSE; - if(isset($config->current['AUTH_MAIL']) && preg_match("/true/",$config->current['AUTH_MAIL'])){ + if(isset($config->current['AUTH_MAIL']) && preg_match("/^true$/i",$config->current['AUTH_MAIL'])){ $auth_mail = TRUE; } @@ -344,7 +344,7 @@ function ldap_login_user ($username, $password) /* LDAP schema is not case sensitive. Perform additional check. */ $attrs= $ldap->fetch(); if($auth_mail){ - if ($attrs['uid'][0] != $username && $attrs['mail'][0] != $username){ + if ($attrs['uid'][0] != $username && strcasecmp($attrs['mail'][0], $username) != 0){ return(NULL); } }else{