mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-23 22:01:47 +01:00
fixed error in modification of existing group, if groupOfNames can NOT be used together with posixGroup (nis schema)
This commit is contained in:
parent
26e3790620
commit
34346b6847
@ -234,16 +234,16 @@ class accounts_backend
|
||||
}
|
||||
//echo "<p>ldap_".($old ? 'modify' : 'add')."(,$dn,".print_r($to_write,true).")</p>\n";
|
||||
// modifying or adding the entry
|
||||
if ($old && !ldap_modify($this->ds,$dn,$to_write) ||
|
||||
if ($old && !@ldap_modify($this->ds,$dn,$to_write) ||
|
||||
!$old && !@ldap_add($this->ds,$dn,$to_write))
|
||||
{
|
||||
$err = true;
|
||||
if (!$old && $is_group && ($key = array_search('groupofnames',$to_write['objectclass'])) !== false)
|
||||
if ($is_group && ($key = array_search('groupofnames',$to_write['objectclass'])) !== false)
|
||||
{
|
||||
// try again with removed groupOfNames stuff, as I cant detect if posixGroup is a structural object
|
||||
unset($to_write['objectclass'][$key]);
|
||||
unset($to_write['member']);
|
||||
$err = !ldap_add($this->ds,$dn,$to_write);
|
||||
$err = $old ? !ldap_modify($this->ds,$dn,$to_write) : !ldap_add($this->ds,$dn,$to_write);
|
||||
}
|
||||
if ($err)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user