Added support for uninvention

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2020-09-17 22:48:37 +02:00
parent 2a51a44034
commit 6bb5c52d56
2 changed files with 10 additions and 3 deletions

View File

@ -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',

View File

@ -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])) {