Deleting PM Spam from member

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.
 
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;
 
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 ;)
 
Top Bottom