• 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

Michael

Active member
#1
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.
 

Jake Bunce

XenForo moderator
Staff member
#2
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;
 

Michael

Active member
#3
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 ;)