From 8eba3a0edb7b9465b519049855600c099da3c999 Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Sun, 25 Jun 2017 12:38:28 +0000 Subject: [PATCH] ntlm_auth() fix Signed-off-by: Janos SUTO --- webui/model/user/auth.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/webui/model/user/auth.php b/webui/model/user/auth.php index 67978779..8a87d575 100644 --- a/webui/model/user/auth.php +++ b/webui/model/user/auth.php @@ -283,7 +283,7 @@ class ModelUserAuth extends Model { foreach($e as $a) { if(LOG_LEVEL >= DEBUG) { syslog(LOG_INFO, "checking ldap entry dn: " . $a['dn'] . ", cn: " . $a['cn']); } - foreach (array("mail", "mailalternateaddress", "proxyaddresses", "zimbraMailForwardingAddress", "member", "memberOfGroup") as $mailattr) { + foreach (array("mail", "mailalternateaddress", "proxyaddresses", "zimbraMailForwardingAddress", "member", "memberOfGroup", "othermailbox") as $mailattr) { if(isset($a[$mailattr])) { if(is_array($a[$mailattr])) { @@ -460,11 +460,16 @@ class ModelUserAuth extends Model { } $ldap_mail_attr = LDAP_MAIL_ATTR; - if(LDAP_MAIL_ATTR == 'proxyAddresses') { $ldap_mail_attr = 'proxyAddresses=smtp:'; } + + if(LDAP_MAIL_ATTR == 'proxyAddresses') { + $ldap_mail_attr = 'proxyAddresses=smtp:'; + } + else { + $ldap_mail_attr .= '='; + } $query = $ldap->query(LDAP_BASE_DN, "(|(&(objectClass=user)(" . $ldap_mail_attr . "$username))(&(objectClass=group)(member=$username))(&(objectClass=group)(member=" . stripslashes($a['dn']) . ")))", array()); - $emails = $this->get_email_array_from_ldap_attr($query->rows); $extra_emails = $this->model_user_user->get_email_addresses_from_groups($emails);