From a71db5a07c01da564792b512f5693e72cad1ff00 Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Tue, 20 Mar 2007 09:24:22 +0000 Subject: [PATCH] write a empty memberuid array to ldap only when updating groups --- phpgwapi/inc/class.accounts_ldap.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpgwapi/inc/class.accounts_ldap.inc.php b/phpgwapi/inc/class.accounts_ldap.inc.php index 469f16db24..1fbf776f06 100644 --- a/phpgwapi/inc/class.accounts_ldap.inc.php +++ b/phpgwapi/inc/class.accounts_ldap.inc.php @@ -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 "

ldap_".($old ? 'modify' : 'add')."(,$dn,".print_r($to_write,true).")

\n"; // modifying or adding the entry if ($old && !@ldap_modify($this->ds,$dn,$to_write) ||