Code

Fixed PHP warning.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 17 Dec 2007 06:59:47 +0000 (06:59 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 17 Dec 2007 06:59:47 +0000 (06:59 +0000)
- If login informations were wrong, there poped up some PHP warnings

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8130 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/functions.inc

index 812715bf0976fc3b6562992c913f89e77a413124..b3e441aa01218791ad5a238a1222c3a183ecda3e 100644 (file)
@@ -348,7 +348,7 @@ function ldap_login_user ($username, $password)
   $attrs= $ldap->fetch();
   $success = FALSE;
   foreach($verify_attr as $attr){
-    if ($attrs[$attr][0] == $username){
+    if(isset($attrs[$attr][0]) && $attrs[$attr][0] == $username){
       $success = TRUE;
     }
   }