mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-25 20:40:13 +01:00
ntlm_auth() fix
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
89e612b128
commit
730e166868
@ -283,7 +283,7 @@ class ModelUserAuth extends Model {
|
|||||||
foreach($e as $a) {
|
foreach($e as $a) {
|
||||||
if(LOG_LEVEL >= DEBUG) { syslog(LOG_INFO, "checking ldap entry dn: " . $a['dn'] . ", cn: " . $a['cn']); }
|
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(isset($a[$mailattr])) {
|
||||||
|
|
||||||
if(is_array($a[$mailattr])) {
|
if(is_array($a[$mailattr])) {
|
||||||
@ -460,11 +460,16 @@ class ModelUserAuth extends Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$ldap_mail_attr = LDAP_MAIL_ATTR;
|
$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());
|
$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);
|
$emails = $this->get_email_array_from_ldap_attr($query->rows);
|
||||||
|
|
||||||
$extra_emails = $this->model_user_user->get_email_addresses_from_groups($emails);
|
$extra_emails = $this->model_user_user->get_email_addresses_from_groups($emails);
|
||||||
|
Loading…
Reference in New Issue
Block a user