RSS Icon Twitter Icon Linked In Icon

Web Threads » Development » Find Deleted SMF User Posts

Find Deleted SMF User Posts

When an SMF member deletes their account and then contacts you to delete their posts, it’s not an easy request because the posts are no longer attached to a user account. What can you do? You can query the database for the list of the messages they posted.

SELECT * FROM smf_messages WHERE posterName='{deletedusername}'

Replace all of {deletedusername} with the username of the deleted member and update your table name for smf_messages.

You could run a DELETE query, but this could result in some odd behaviour, forum message counts would be wrong and if it’s the first post of a topic, it could make the whole topic out of kilter. It’s best to manually delete these. (And you might consider wanting to charge people for your trouble!)

After running the above query in phpmyadmin, click the export link at the bottom and save to excel csv.

Once you have the excel file, you can copy the full link to the the forum index.php?topic= in a new inserted column. Copy from the first row and highlight the rest to paste to all cells. Delete or move the second column (message numbers) so that the link column is next to the topic number. You could then highlight both columns and paste to a text file for list of links to the topics, or concatenate (merge) both columns in another new column.

1 person likes this post.

Filed under: Development · Tags: , ,

Leave a Reply