|Status:||patch (to be ported)|
Currently it's quite hard to write a module that deletes nodes of a user when the user gets deleted. This is, because node_delete() depends on node_load(), which depends on an existing entry in the user table - but the user module deletes this entry *before* it invokes the user hook.
Attached is a simple patch, which does nothing more, but invoking the hook *before* deleting the entries in the user tables.
I ran over this while working on content profile. I have already working code without this patch - ported from d5, but it's a complicated, ugly workaround, that basically re-implements node_load() and node_delete().
This patch would allow me to replace this (long) hack by some simple code. Actually it would save about 90 loc! (related content profile patch