MyBB Community Forums

Full Version: pruning posts after having deleted user
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A new user spammed us yesterday with 42 spam posts!!!
I mistakenly deleted that user (instead of banning the user) and now I cannot get to the pruning feature so I am deleting all 42 posts one by one ...

Is there a way to still prune these spam posts?
If you know the uid of the person run the following in PHPMyAdmin
DELETE FROM mybb_posts WHERE uid=x
Then run
DELETE FROM mybb_threads WHERE uid=x

Replace x with the uid of the member.

If you only know the username use the following 2 queries instead:
DELETE FROM mybb_posts WHERE username='x'
DELETE FROM mybb_threads WHERE username='x'

Replace x with the username. Note that the username must be enclosed in single quotes.

If you do not remember either, you can get the uid from the Admin log because it will say Deleted User #x (username).

After doing one of those, go to the Admin CP->Tools->Recount & Rebuild-> Rebuild Thread Counters. After that, Rebuild Forum Counters.
If you delete the user they won't have a UID, it becomes 0. So you'd have to use where username='x'.

To save you the trouble next time, check out: http://mods.mybb.com/view/goodbye-spammer
(2012-12-28, 04:23 PM)dragonexpert Wrote: [ -> ]If you know the uid of the person run the following in PHPMyAdmin
DELETE FROM mybb_posts WHERE uid=x
Then run
DELETE FROM mybb_threads WHERE uid=x

Replace x with the uid of the member.

If you only know the username use the following 2 queries instead:
DELETE FROM mybb_posts WHERE username='x'
DELETE FROM mybb_threads WHERE username='x'

Replace x with the username. Note that the username must be enclosed in single quotes.

If you do not remember either, you can get the uid from the Admin log because it will say Deleted User #x (username).

After doing one of those, go to the Admin CP->Tools->Recount & Rebuild-> Rebuild Thread Counters. After that, Rebuild Forum Counters.

Thanks for that, I will do that ...

(2012-12-28, 05:26 PM)KoBE Wrote: [ -> ]If you delete the user they won't have a UID, it becomes 0. So you'd have to use where username='x'.

To save you the trouble next time, check out: http://mods.mybb.com/view/goodbye-spammer

thank you .. i will check it out ...
(2012-12-28, 04:23 PM)dragonexpert Wrote: [ -> ]If you know the uid of the person run the following in PHPMyAdmin
DELETE FROM mybb_posts WHERE uid=x
Then run
DELETE FROM mybb_threads WHERE uid=x

Replace x with the uid of the member.

If you only know the username use the following 2 queries instead:
DELETE FROM mybb_posts WHERE username='x'
DELETE FROM mybb_threads WHERE username='x'

Replace x with the username. Note that the username must be enclosed in single quotes.

If you do not remember either, you can get the uid from the Admin log because it will say Deleted User #x (username).

After doing one of those, go to the Admin CP->Tools->Recount & Rebuild-> Rebuild Thread Counters. After that, Rebuild Forum Counters.

i deleted both posts and threads and run rebuild threads and Counters still yet the Post and thread of the Unregistered user still existing

please help me i cannot delete all the post one by one about 25,000 thread and post

I deleted the post and thread from Phpmyadmin but the unregistered user post and thread still existing, i tried creating a clone ID so that i can pruning the User but wasn't working any Guru to help me out