forked from extern/egroupware
"fixed not working modification of contact with cn= dn"
This commit is contained in:
parent
03cf41c5ba
commit
1828683be2
@ -358,6 +358,7 @@ class so_ldap
|
|||||||
'(|(entryUUID='.ldap::quote($contactUID).')(uid='.ldap::quote($contactUID).'))', $attributes)) &&
|
'(|(entryUUID='.ldap::quote($contactUID).')(uid='.ldap::quote($contactUID).'))', $attributes)) &&
|
||||||
($oldContactInfo = ldap_get_entries($this->ds, $result)) && $oldContactInfo['count'])
|
($oldContactInfo = ldap_get_entries($this->ds, $result)) && $oldContactInfo['count'])
|
||||||
{
|
{
|
||||||
|
unset($oldContactInfo[0]['objectclass']['count']);
|
||||||
foreach($oldContactInfo[0]['objectclass'] as $objectclass)
|
foreach($oldContactInfo[0]['objectclass'] as $objectclass)
|
||||||
{
|
{
|
||||||
$oldObjectclasses[] = strtolower($objectclass);
|
$oldObjectclasses[] = strtolower($objectclass);
|
||||||
@ -431,7 +432,7 @@ class so_ldap
|
|||||||
{
|
{
|
||||||
if (!@ldap_mod_add($this->ds, $dn, array('objectClass' => $ldapContact['objectClass'])))
|
if (!@ldap_mod_add($this->ds, $dn, array('objectClass' => $ldapContact['objectClass'])))
|
||||||
{
|
{
|
||||||
if(ldap_errno($this->ds) == 69)
|
if(in_array(ldap_errno($this->ds),array(69,20)))
|
||||||
{
|
{
|
||||||
// need to modify structural objectclass
|
// need to modify structural objectclass
|
||||||
$needRecreation = true;
|
$needRecreation = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user