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

XF 1.2 Need a way to mass-delete attachments for one user

Discussion in 'Troubleshooting and Problems' started by Rudy, Jan 2, 2014.

  1. Rudy

    Rudy Well-Known Member

    We have a user who has made some questionable posts with attachments (who has since been banned), but we need a way to quickly remove all of his attachments.

    Is there a query or two I can make in the database to properly attend to this? Or, a PHP script that I can use to also make certain that the files are deleted as well? I'm sure someone has probably done this in the past, and time is of the essence (in other words, it has to happen ASAP for legal reasons--can't be waiting for add-ons or new features to be added).
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Applications -> Attachment Browser
  3. Rudy

    Rudy Well-Known Member

    Sorry, I should have mentioned that won't work--I can't find any staffer who wants to delete 900+ attachments by hand that way. I did two pages' worth a couple of months ago when this all started, and got a bit pickled with how inefficient the system is for this sort of thing.

    I guess I could say we are now in a "triage" mode with this member.
  4. Brogan

    Brogan XenForo Moderator Staff Member

    If it's urgent then that is your only option currently.

    Each page lists 50 attachments so selecting all means you can do it with 18 separate operations, which should only take a few minutes at most.

Share This Page