Deleting a users posts (with large post count+history)


A user has asked to leave our Community, and wants all their posts removed. They’ve been a Community member for a few years, so have a large number of posts and topics created.

I can overrule the ‘max post delete’ options in the admin, but I wanted to sense check the next steps. If anyone else has any experience of this, it’d be great.

Unfortunately the user has turned down the option to simply anonymise the account, so we’re having to do a full deletion.

Am I right in thinking that this will also delete all the topics the user has made, even if they contained posts by other users? Is there any way to avoid this, beyond manually reassigning all of their topics to another account?

And is there anything else that might break during this process?


I think that what you’ll need to do is select all posts owned by the user and replace the post with

Post deleted at request of user

Something like

Post.where("id = 123").update_all(raw: "Post deleted...")

That’s not tested. You’d want to test it. I’m not sure if you’d need to rebake those posts or not.

Edit: I think that’d still leave the edit history, though. But, maybe only if there were an edit history.

1 Like

If you are using the default licensing files included with Discourse, then under the creative commons license, the user doesn’t have the right to pull all their content. Anonymization is all that is guaranteed.