visionstwent Posted July 16, 2020 Share Posted July 16, 2020 Dear IPB community, is there a way to delete all messages (conversations) for all users of IPB? I was able to identidy the following tables: Quote core_message_topics core_message_topic_user_map The table holding the messages itself is still missing, can somebody please show me for example SQL queries to delete all messages (conversations)? Meaning a complete purge. Link to comment Share on other sites More sharing options...
bfarber Posted July 16, 2020 Share Posted July 16, 2020 I wouldn't recommend this approach. Things like notifications would be hard to capture, and deleting attachments wouldn't be possible. You would be better off writing a background queue task that loops through all PMs and deletes them using the built in content item delete() method. Link to comment Share on other sites More sharing options...
Sheffielder Posted July 17, 2020 Share Posted July 17, 2020 Hi there, I urgently need this I've had a spammer join the site, send 5,500 PM's without my knowledge I deleted their account so they're a guest but their messages remain Is there any way to delete them? Link to comment Share on other sites More sharing options...
DawPi Posted July 18, 2020 Share Posted July 18, 2020 @Sheffielder: Joel R 1 Link to comment Share on other sites More sharing options...
visionstwent Posted July 18, 2020 Author Share Posted July 18, 2020 @bfarber Can you provide SQL queries (notifications included for sure)? Query should delete all everything related to the conversation "directly": -conversations -attachments (related to conversations) -notifications (related to conversations) Link to comment Share on other sites More sharing options...
bfarber Posted July 20, 2020 Share Posted July 20, 2020 It's not possible. Like, for attachments you also need code that deletes the physical file on disk (including accounting for S3 storage). This is just a process that is best left to running correct PHP methods to ensure everything is accounted for (notifications, tags, attachments, etc. etc.) Link to comment Share on other sites More sharing options...
visionstwent Posted July 22, 2020 Author Share Posted July 22, 2020 I'll take a look into on our demo setup and play a bit around. Any idea where the messages itself are stored (each message)? I wasn't able to locate the table!? Link to comment Share on other sites More sharing options...
bfarber Posted July 22, 2020 Share Posted July 22, 2020 core_message_posts Link to comment Share on other sites More sharing options...
visionstwent Posted July 23, 2020 Author Share Posted July 23, 2020 (edited) --Solved. Edited July 23, 2020 by visionstwent Link to comment Share on other sites More sharing options...
Recommended Posts