write a empty memberuid array to ldap only when updating groups

This commit is contained in:
Lars Kneschke 2007-03-20 09:24:22 +00:00
parent f05bc701a6
commit a71db5a07c

View File

@ -298,6 +298,11 @@ class accounts_backend
}
$data['account_type'] = 'u';
}
// remove memberuid when adding a group
if(!$old && is_array($to_write['memberuid']) && empty($to_write['memberuid'])) {
unset($to_write['memberuid']);
}
//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) ||