I've added node_user hook, to re-assign all content from deleted users to anonymous during deleting.

CommentFileSizeAuthor
node_delete_user.txt667 byteskuba.zygmunt

Comments

matt westgate’s picture

-1

I think most admins expect that when a user is deleted, their content is also deleted or at least hidden.

While I don't want to see a GUI for this, I still like the idea of controlling finer Drupal details though the $conf init array in settings.php.

Thomas Ilsche’s picture

By the way: For my work (soc testsuite project) it would be quite handy to have a dedicated user_delete function (like user_save). Is there any policy or plan against this.

Thomas Ilsche

Steve Dondley’s picture

I think whether or not cotent gets deleted when a user does should be optional. When deleting a user, there should be a checkbox that says "Delete user's content," defaulted to on. Or there should at least be a warning.

Quite a bit of the site could get unwittingly obliterated. I've had this happen to me. I set up a test account. Then I added some content with the account. After I was done with the account, I was quite surprised to discover all the content gone.

Crell’s picture

I would definitely prefer to have content remain around and flagged anonymous rather than be deleted. That's especially true for historical data in a site where the user population is transient. I'd make it an option in the settings somewhere which to default to, so that it's harder to forget and do it wrong if your usual preference doesn't match up with the expected default. :-)

nedjo’s picture

Status: Needs review » Closed (duplicate)

Duplicate of http://drupal.org/node/19055, posted last March--a good sign that the issue remains relevant.

Bèr Kessels’s picture

-1 for removing. In drupal that is non-reversable.
+1 for flagging as anonymous, unpublishing and placing in the modetration queue by default, though.

kuba.zygmunt’s picture

Assigned: Unassigned » kuba.zygmunt

I would like to take this assignment.

moshe weitzman’s picture

the unit testing framework really needs a full and permanent user delete function to be offerred by user.module. that function could be an option never used by drupal itself.

Eglish’s picture

@kubaZygmunt: How is this issue, and 'deleted users' nodes disappear' coming along?