From fd37251ac441d35b704e4f038d29aa61c3c7df84 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 31 Oct 2014 15:31:32 +0000 Subject: [PATCH] setting sambaPrimaryGroupSID and univentionObject with univentionObjectType --- phpgwapi/inc/class.accounts_ldap.inc.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.accounts_ldap.inc.php b/phpgwapi/inc/class.accounts_ldap.inc.php index e51b1134c5..d64246a540 100644 --- a/phpgwapi/inc/class.accounts_ldap.inc.php +++ b/phpgwapi/inc/class.accounts_ldap.inc.php @@ -83,13 +83,14 @@ class accounts_ldap 'top','person','organizationalperson','inetorgperson','posixaccount','shadowaccount' ), 'user-if-supported' => array( // these classes get added, if server supports them - 'mozillaabpersonalpha','mozillaorgperson','evolutionperson','univentionperson' + 'mozillaabpersonalpha', 'mozillaorgperson', 'evolutionperson', + 'univentionperson', array('univentionobject', 'univentionObjectType' => 'users/user'), ), 'group' => array( 'top','posixgroup','groupofnames' ), 'group-if-supported' => array( // these classes get added, if servers supports them - 'univentiongroup', + 'univentiongroup', array('univentionobject', 'univentionObjectType' => 'groups/group'), ) ); /** @@ -255,9 +256,16 @@ class accounts_ldap { // as setting them later might loose eg. password, if we are not allowed to read them foreach($this->requiredObjectClasses[$is_group?'group-if-supported':'user-if-supported'] as $additional) { + $add = array(); + if (is_array($additional)) + { + $add = $additional; + $additional = array_shift($add); + } if ($this->ldapServerInfo->supportsObjectClass($additional)) { $to_write['objectclass'][] = $additional; + if ($add) $to_write += $add; } } }