XF 1.3 Bulk delete threads in node X if user is banned?

Kevin

Well-known member
I'm working on cleaning up a rather large database import and one of the things I'm trying to deal with is banned users (eg: users were banned for spam or for some other reason, and so on).

As part of the clean up is there a SQL query I could do to delete any threads and posts in a specified forum node if the user is banned? I imagine it might get tricky if there is a thread started by a banned user and there are replies from users who aren't banned so to make it easier... a SQL query to delete threads in a specified forum node that have no replies and the thread is associated to a banner user?
 
You can use the Batch Update Threads function for that.
You know... you're right, I can! :D

I rarely use the batch threads update that I tend to forget it's out there and what options it has. Batch users I use regularly enough but not batch threads.

Thanks, off to cleaning up now.
 
Wait, maybe this is what I ran into before....

How do I specify that I only want threads from banned users in the specified forum? I don't see a way of specifying that as a criteria. :(
 
You can't specifically filter on threads started by banned members, but you can enter the member name in the "Created by" field.
Ah, that's a problem as there are a few thousand.

I saw one of the criteria is if the thread state is moderated. Chance of being able to do a SQL query to change the thread state first to be moderated and then use that from the ACP?
 
Back
Top Bottom