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

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

Discussion in 'XenForo Questions and Support' started by Kevin, Aug 6, 2014.

  1. Kevin

    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?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You can use the Batch Update Threads function for that.
  3. Kevin

    Kevin Well-Known Member

    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.
  4. Kevin

    Kevin Well-Known Member

    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. :(
  5. Brogan

    Brogan XenForo Moderator Staff Member

    You can't specifically filter on threads started by banned members, but you can enter the member name in the "Created by" field.
  6. Kevin

    Kevin Well-Known Member

    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?

Share This Page