check_ldap_membership() fix

This commit is contained in:
SJ 2014-09-16 08:48:19 +02:00
parent c25e00270c
commit 1313ab520c

View File

@ -177,7 +177,8 @@ class ModelUserAuth extends Model {
foreach (array("memberof", "dn") as $memberattr) {
if(isset($a[$memberattr])) {
if(isset($a[$memberattr]['count'])) {
if(isset($a[$memberattr]['count']) && $a[$memberattr]['count'] > 0) {
for($i = 0; $i < $a[$memberattr]['count']; $i++) {
if($a[$memberattr][$i] == $ldap_auditor_member_dn) {
return 1;