MyBB Community Forums

Full Version: delete all pm in mybb
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
anyone know how to delete all users pm in mybb by running sql query? what will be the query?
Run this to delete all private messages:

DELETE FROM `mybb_privatemessages`

You will then need to recount and rebuild the private messages. To do this, run the following querys:

UPDATE `mybb_users` SET `totalpms`='0'

UPDATE `mybb_users` SET `unreadpms`='0'
how to delete all read private messages only? don't want to delete those unread ones. btw thnx for the help.Smile
To delete only unread messages, run this query:

DELETE FROM `mybb_privatemessages` WHERE `NOT status=0`
You can install a pm admin log plugin. You could delete, read and search all PMs on board. I personally like using this plugin because I know what's going on, who sent a PM to who, delete advertising PMs etc. Also good to view discussions between a scammer and victim.

Edited

Link: http://mods.mybb.com/view/private-messag...ned-for-14

Edit the plugin file and change the compatibility.