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

XF 1.5 Delete a user's post before a specific date

#1
Hello all,

I have a user who is concerned about the content he posted before a certain date, and has requested removal of that content. I'd like to avoid deleting all of his content, so I'm wondering, is there a way to do this, either through a plugin or SQL command? Either would be extremely helpful, as this would avoid deleting all of his posts or doing this manually. I have searched and was unable to find how to do this.

Any and all help is greatly appreciated!
 

n00bsaibot

Well-known member
#2
SELECT * FROM `xf_post`
WHERE `user_id` = 1
AND `post_date` < 1483228800

^ you can run that in myphpadmin and get the output. Check all and delete.


Just, no.
 
Last edited by a moderator:

Brogan

XenForo moderator
Staff member
#6
I would suggest deleting posts via phpMyAdmin isn't the best idea.

We would never recommend it and won't be able to provide support going forward for any subsequent issues.
 

Brogan

XenForo moderator
Staff member
#10
You can do a search and select all posts on a page - if the member has e.g. 100 posts, that would be something like 10 clicks to select all and delete, if the results/posts per page are 20.
You could temporarily increase that value to something like 100 for the task.

Why is deleting the posts via phpMyAdmin a bad idea?
Because there are lots of tables which are related and deleting data in that manner does not update everything correctly.
 
#11
We're talking about a user with tens of thousands of posts... still a ton of work.

I mean it's not your fault that there's no more efficient way, but for forum software this expensive I'd expect there to be something a bit more user-friendly for this. At the same time, I suppose this isn't a situation that comes up often for most admins.
 

AndyB

Well-known member
#12
Hello all,

I have a user who is concerned about the content he posted before a certain date, and has requested removal of that content. I'd like to avoid deleting all of his content, so I'm wondering, is there a way to do this, either through a plugin or SQL command? Either would be extremely helpful, as this would avoid deleting all of his posts or doing this manually. I have searched and was unable to find how to do this.

Any and all help is greatly appreciated!

You can use this addon:

https://xenforo.com/community/resources/delete-posts.3102/

Just set the Limit to the correct number to delete up to the date you wish.