diff --git a/webui/model/user/auth.php b/webui/model/user/auth.php index 69e39174..902b8ff6 100644 --- a/webui/model/user/auth.php +++ b/webui/model/user/auth.php @@ -69,7 +69,7 @@ class ModelUserAuth extends Model { $query = $ldap->query(LDAP_BASE_DN, "(&(objectClass=" . LDAP_ACCOUNT_OBJECTCLASS . ")(" . LDAP_MAIL_ATTR . "=$username))", array()); - if(isset($query->row)) { + if(isset($query->row['dn'])) { $a = $query->row; $ldap_auth = new LDAP(LDAP_HOST, $a['dn'], $password);