If you delete a client node, the corresponding ldap tree is not deleted.

Comments

dirk.westrup’s picture

Could be a minor write error in line 1456 in dlsconnect.module:

foreach ($clientusers as $clientpuser) {
  dlsconnect_clientuser_delete($clientuser['nid'], $clientuser['uid']);
}

Will check this.

dirk.westrup’s picture

Status: Active » Needs review
StatusFileSize
new1.06 KB

Patch attached.

dirk.westrup’s picture

Status: Needs review » Active

There are still problems:

First, some error messages appears like:
warning: ldap_modify(): Modify: Invalid DN syntax in .../sites/all/modules/ldap_integration/includes/LDAPInterface.inc on line 262.
warning: parse_url(http:///dls_soap_api.phtml): Unable to parse URL in .../sites/all/libraries/nusoap/lib/nusoap.php on line 2274.
warning: Invalid argument supplied for foreach() in .../sites/all/libraries/nusoap/lib/nusoap.php on line 2275.

I have sent you a mail containing the complete message list.

Second, the dls user is not deleted on dls server.

c-logemann’s picture

c-logemann’s picture

Assigned: Unassigned » c-logemann

There is a small logic error on a database call which is limited to clients which are active. I will create an extra database call for cleaning up on deleting a client node where status field will be ignored. But this is only one small problem.
The single deletion of DLS users and DLS group nodes is working. But each DLS operation needs the DLS connection data of the client node. So it seems that the current strategy of deleting all related data doesn't work the deletion functions from hook_nodeapi().
I think the easiest way is to make cleanup in two steps:
First delete all DLS group nodes and DLS client users of one client node.
Second delete the client node itself or reuse it, so we get a new feature :-)
I will implement this strategy soon.

c-logemann’s picture

Status: Active » Needs review

Added manual cleanup for client data as described above:
http://drupal.org/commitlog/commit/25874/ca486901bb1afe03526d782059ce92b...

The bad cleanup on deleting ciient node is removed.
Only the soap user on LDAP and internal Databse and the client tree on LDAP is deleted

The links to cleanup menu items are added to block "show client data". There you can find the functions to test if any users or groups are left and maybe manipulate the node deletion in your custom code.

dirk.westrup’s picture

Status: Needs review » Closed (fixed)

Bug fixed. Cleanup successfully tested. Works fine.