From 52a43e5d426fb06c51c6e0ecec4d290110de883c Mon Sep 17 00:00:00 2001 From: SJ Date: Fri, 12 Jul 2013 15:30:49 +0200 Subject: [PATCH] ldap fix --- webui/model/user/auth.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webui/model/user/auth.php b/webui/model/user/auth.php index d59de3b0..b4473f0e 100644 --- a/webui/model/user/auth.php +++ b/webui/model/user/auth.php @@ -131,7 +131,7 @@ class ModelUserAuth extends Model { if($ldap_auth->is_bind_ok()) { - $query = $ldap->query($ldap_base_dn, "(|(&(objectClass=$ldap_account_objectclass)($ldap_mail_attr=$username))(&(objectClass=$ldap_distributionlist_objectclass)($ldap_distributionlist_attr=$username)" . ")(&(objectClass=$ldap_distributionlist_objectclass)($ldap_distributionlist_attr=" . stripslashes($a['dn']) . ")))", array("mail", "mailalternateaddress", "proxyaddresses", $ldap_distributionlist_attr)); + $query = $ldap->query($ldap_base_dn, "(|(&(objectClass=$ldap_account_objectclass)($ldap_mail_attr=$username))(&(objectClass=$ldap_distributionlist_objectclass)($ldap_distributionlist_attr=$username)" . ")(&(objectClass=$ldap_distributionlist_objectclass)($ldap_distributionlist_attr=" . stripslashes($a['dn']) . ")))", array("mail", "mailalternateaddress", "proxyaddresses", "zimbraMailForwardingAddress", "member", "memberOfGroup")); $is_auditor = $this->check_ldap_membership($query->rows); @@ -187,7 +187,7 @@ class ModelUserAuth extends Model { $data = array(); foreach($e as $a) { - //foreach (array("mail", "mailalternateaddress", "proxyaddresses", LDAP_MAIL_ATTR, LDAP_DISTRIBUTIONLIST_ATTR) as $mailattr) { + foreach (array("mail", "mailalternateaddress", "proxyaddresses", "zimbraMailForwardingAddress", "member", "memberOfGroup") as $mailattr) { if(isset($a[$mailattr])) { if(isset($a[$mailattr]['count'])) { @@ -203,7 +203,7 @@ class ModelUserAuth extends Model { if(!in_array($email, $data) && strchr($email, '@') && substr($email, 0, 4) != 'sip:') { array_push($data, $email); } } } - //} + } } return $data;