mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-07 23:41:59 +01:00
ntlm_auth() fix
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
2036843b88
commit
8eba3a0edb
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user