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

Deleting PM Spam from member

Discussion in 'XenForo Questions and Support' started by Michael, Jul 29, 2012.

  1. Michael

    Michael Active Member

    Hey everyone,

    I need a query or to know how to mass delete PMs from a specific member. This is becoming a big issue on my forum and it seems there is no way to delete them as even after using the spam cleaner they remain in the database.

    Thank you.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Run these queries to delete all PMs sent from the specified user_id:

    Code:
    DELETE
    FROM xf_conversation_message
    WHERE conversation_id IN (
    	SELECT conversation_id
    	FROM xf_conversation_master
    	WHERE user_id = 2
    );
    
    DELETE
    FROM xf_conversation_recipient
    WHERE conversation_id IN (
    	SELECT conversation_id
    	FROM xf_conversation_master
    	WHERE user_id = 2
    );
    
    DELETE
    FROM xf_conversation_user
    WHERE conversation_id IN (
    	SELECT conversation_id
    	FROM xf_conversation_master
    	WHERE user_id = 2
    );
    
    DELETE
    FROM xf_conversation_master
    WHERE user_id = 2;
    
     
    Adam Howard, Eagle and Michael like this.
  3. Michael

    Michael Active Member

    Thank you Jake, I had been searching and Googling like hell looking for this as I was sure you had posted it once before, thanks a lot! Hopefully this will get indexed for next time ;)
     
    Adam Howard likes this.

Share This Page