[drupal-devel] [bug] When I delete a user,
any forum in which s/he has commented also disappears.
Uwe Hermann
drupal-devel at drupal.org
Sun Aug 21 21:02:00 UTC 2005
Issue status update for
http://drupal.org/node/17428
Post a follow up:
http://drupal.org/project/comments/add/17428
Project: Drupal
Version: 4.5.0
Component: comment.module
Category: bug reports
Priority: critical
Assigned to: Jill6q
Reported by: Jill6q
Updated by: Uwe Hermann
-Status: active
+Status: patch (code needs review)
Updating status.
Uwe Hermann
Previous comments:
------------------------------------------------------------------------
Wed, 16 Feb 2005 17:43:53 +0000 : Jill6q
Hi,
I'm an administrator, and I've discovered that when I delete a user,
drupal deletes a) all the forums that the user has created and b) if
the user has made any comments in someone else's forum, that forum gets
deleted too.
i.e. if Dan has commented in the Italian Food forum (the forum was
created by admin), and I delete Dan's account, the Italian Food forum
disappears entirely from the "Forums" page.
Any help for this?
Many thanks! (I love drupal)
Jill
------------------------------------------------------------------------
Thu, 21 Apr 2005 12:10:33 +0000 : menesis
Attachment: http://drupal.org/files/issues/comment_author_delete.patch (996 bytes)
I've run into such problem before, with nodes authored by deleted user
which dissapear, see http://drupal.org/node/19055 . I've fixed that for
myself by resetting node's author to Anonymous, so that the node remains
visible. Neither nodes nor comments aren't deleted, they are still there
in database, but queries break and nodes or whole forums are not shown.
Same fix could be done to comments. Since comments have author's name
as well as uid, changing their uid to 0 still leaves the comment with
poster's name, so they look the same, and forums or any other nodes the
user commented on don't disappear.
This fixes a problem with broken forums, but others don't like such
approach because if they delete the user, that's because he abused or
spammed the site, so they want to delete his/her nodes/comments as
well. You could do that same way as in my patches, changing queries
from UPDATE to DELETE.
More information about the drupal-devel
mailing list