From 731c2179ea0a639eb306c52f7c149eddee331339 Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 4 Apr 2007 08:53:33 +0000 Subject: [PATCH] Fixed #29 which caused a failing removal of samba accounts if "sambaidmapping" is set to "true" git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5970 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/personal/samba/class_sambaAccount.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plugins/personal/samba/class_sambaAccount.inc b/plugins/personal/samba/class_sambaAccount.inc index 85c8c2fa7..7bfcaf75a 100644 --- a/plugins/personal/samba/class_sambaAccount.inc +++ b/plugins/personal/samba/class_sambaAccount.inc @@ -663,6 +663,16 @@ class sambaAccount extends plugin unset($this->attrs['uid']); unset($this->attrs['uidNumber']); unset($this->attrs['gidNumber']); + + /* Remove objectClass for sambaIdmapEntry */ + $tmp= array(); + for ($i= 0; $iattrs["objectClass"]); $i++){ + if ($this->attrs['objectClass'][$i] != 'sambaIdmapEntry'){ + $tmp[]= $this->attrs['objectClass'][$i]; + } + } + $this->attrs['objectClass']= $tmp; + @DEBUG (DEBUG_LDAP, __LINE__, __FUNCTION__, __FILE__, $this->attributes, "Save"); $ldap->cd($this->dn); -- 2.30.2