diff --git a/config.php.in b/config.php.in index 6eb8e6c1..020769dd 100644 --- a/config.php.in +++ b/config.php.in @@ -115,7 +115,11 @@ $config['LDAP_MAIL_ATTR'] = 'proxyAddresses'; //$config['LDAP_DISTRIBUTIONLIST_ATTR'] = 'memberOfGroup'; //$config['LDAP_MAIL_ATTR'] = 'mail'; - +// Uninvention specific settings +//$config['LDAP_MAIL_ATTR'] = 'mailPrimaryAddress'; +//$config['LDAP_ACCOUNT_OBJECTCLASS'] = 'person'; +//$config['LDAP_DISTRIBUTIONLIST_OBJECTCLASS'] = 'person'; +//$config['LDAP_DISTRIBUTIONLIST_ATTR'] = 'mailAlternativeAddress'; // enable single sign-on (disabled by default) @@ -311,6 +315,8 @@ $config['DELIMITER'] = "\t"; $config['TRACKING_CODE'] = ''; +$mailattrs = ["mail", "mailalternateaddress", "proxyaddresses", "zimbraMailForwardingAddress", "member", "memberOfGroup", "othermailbox", "mailprimaryaddress", "mailalternativeaddress"]; + $langs = array( 'cz', 'de', diff --git a/webui/model/user/auth.php b/webui/model/user/auth.php index e102e231..d9cc383f 100644 --- a/webui/model/user/auth.php +++ b/webui/model/user/auth.php @@ -293,12 +293,13 @@ class ModelUserAuth extends Model { public function get_email_array_from_ldap_attr($e = array()) { - $data = array(); + global $mailattrs; + $data = []; 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", "othermailbox") as $mailattr) { + foreach ($mailattrs as $mailattr) { if(isset($a[$mailattr])) { if(is_array($a[$mailattr])) {