• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 Permanent delete of all posts made by a user

Floren

Well-known member
#1
I had recently a request from a user to delete all his posts. We are talking of 10,000 posts, the Spam Cleaner simply crashed. Even if I've set the InnoDB wait time to 600, I had to reboot the server in order to make it responsive.

Can I just run few MySQL queries to delete the data from post and thread tables, then rebuilt the indices?
 

Jake Bunce

XenForo moderator
Staff member
#2
Can I just run few MySQL queries to delete the data from post and thread tables, then rebuilt the indices?
Yes and no. There are many joined records in other tables that are hard to account for when running manual queries. You can end up with orphaned records in the database which isn't necessarily a problem, but it's not a clean solution.

Ideally XenForo needs batch processing for tasks like this.
 
F

Floris

Guest
#3
On topic: We run into this almost weekly. We resolved it with a plugin that does batching through xenforo, by putting a limit in the source code and run every 15 minutes to not stress the site.

Off topic: I hate it that people sometimes do this. I usually put in my site that contributed content becomes our property and we do not remove it; to think twice before posting.
 

RobParker

Well-known member
#4
I agree with Floris, surely removing 10K posts is going to seriously mess up the threads he contributed to?

A much better approach would be a policy one, where you don't have to agree to removing them.
 
F

Floris

Guest
#5
I agree with Floris, surely removing 10K posts is going to seriously mess up the threads he contributed to?

A much better approach would be a policy one, where you don't have to agree to removing them.
Sometimes choosing to do that just to get rid of a user and repurpose your time to focus on something worth doing, versus ignoring the person and eventually showing up in small claims court to get your right, and invest money and time and effort .. The user will loose, in almost all cases (especially in Europe).
 

dojo

Active member
#6
@Floris: good tip. Have it in your rules that once they submit the content, they are not allowed to have it removed. I can't mess up my entire content just cause x, after 4 years (or whatever) since being an active member (and getting traffic to their site, since I allow links in signatures) decides to leave and slam the door. Had such an issue in 2004, learned my lesson :D
 
F

Floris

Guest
#7
@Floris: good tip. Have it in your rules that once they submit the content, they are not allowed to have it removed. I can't mess up my entire content just cause x, after 4 years (or whatever) since being an active member (and getting traffic to their site, since I allow links in signatures) decides to leave and slam the door. Had such an issue in 2004, learned my lesson :D
Don't forget to mention that since they're the author they're responsible for their posts. You don't want to be liable for their stupidity.