Delete private conversations in bulk.

Delete private conversations in bulk.

Wildcat Media

Well-known member
Rudy submitted a new resource:

Delete private conversations in bulk. - Bulk private conversations got you down? Here's how you can clean out those inboxes.

Did a staff member accidentally send out a bulk private conversation to the forum membership? That happened with us. As a result, we had over 39,000 private conversations all originating from one user, not only clogging up his inbox, but getting into the inboxes of all the forum members who received it.

The nuclear option was to use the XenForo option to delete all of the user's private conversations. Ultimately they wouldn't have minded, but to me it didn't feel right to throw away...

Read more about this resource...
 
Rather than run these as single queries, you can bulk do it as follows;

Code:
SELECT rcpt.*, user.*, msg.*, wll.*
FROM xf_conversation_recipient AS rcpt
JOIN xf_conversation_user AS user ON rcpt.conversation_id = user.conversation_id
JOIN xf_conversation_message AS msg ON rcpt.conversation_id = msg.conversation_id
JOIN xf_conversation_master AS wll ON rcpt.conversation_id = wll.conversation_id
WHERE wll.title = 'XXXXX'
AND wll.user_id = 1;

Code:
DELETE rcpt, user, msg, wll
FROM xf_conversation_recipient AS rcpt
JOIN xf_conversation_user AS user ON rcpt.conversation_id = user.conversation_id
JOIN xf_conversation_message AS msg ON rcpt.conversation_id = msg.conversation_id
JOIN xf_conversation_master AS wll ON rcpt.conversation_id = wll.conversation_id
WHERE wll.title = 'XXXXX'
AND wll.user_id = 1;

change XXXXX to the pm title and user id to the sender.

Cheers,
M.
 
Back
Top Bottom