Code

Fixed #29 which caused a failing removal of samba accounts
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 4 Apr 2007 08:53:33 +0000 (08:53 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 4 Apr 2007 08:53:33 +0000 (08:53 +0000)
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

index 85c8c2fa7043838271c8ad46ea85e2de0ade2ba7..7bfcaf75a25ac0e83d5e52fc50afccc417d5e0d5 100644 (file)
@@ -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; $i<count($this->attrs["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);