MyBB Community Forums

Full Version: Need some help getting rid of spam users/posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My forum has gotten an obscene amount of spam in the last month and a half or so, which is to be expected since I haven't been paying the slightest bit of attention to it. The problem is that MyBB's built in features for getting rid of spam aren't getting the job done, and I need advice on the most effective way to clear out the spammers on my board.

Here's what I'm trying to do:
Delete all users with a certain user title and their posts
Delete all users/posts created within a certain time frame (say, within the last month)
Delete all users whose email address ends with a certain country code and their posts

MyBB's pruning feature does not let me accomplish the above, because it will only let me delete specific posts defined by post date or age. I don't care how old a user's post was or when it was posted, I just want it gone. At the moment the only way I see to do that using MyBB's native features is to click each user and delete them/their posts one by one, and given that I'm currently dealing with a few thousand spammers, I have no intention of sitting here for weeks trying to get rid of them all manually.

Does anyone have an idea of how I could get rid of the spam and retain my sanity?

Edit: and another problem-- MyBB seems incapable of processing large "delete" operations. If I tell it to delete 900 users, it defaults to 18 instead! This is useless to me for the reasons outlined above.

Any suggestions? I was thinking a Mysql query might do the trick, but I don't know the first thing about them.

An ideal solution would be a query that allows me to find all the accounts created after X date, select both those accounts AND the posts associated with them, then delete them. Is that possible?
Hi there!
I'll try to assist you.
First I'll suggest reading this thread: here. I find it rather useful.

How to run queries: here
Also: useful queries to fight spam

Secondly, about these queries:

delete users with certain usertitle:
DELETE FROM `jungle_users` WHERE usertitle like 'usertitle text'

Here are several other queries for you to use: link
F.e.,
Delete all users from a group (Edit the group ID):
DELETE FROM `mybb_users` WHERE `usergroup` = '1'; 


And modify these to find all latest posts and threads:
Quote:Displays last 5 posts created, in phpmyadmin:
SELECT * FROM (mybb_threads t, mybb_posts p) WHERE p.tid=t.tid ORDER BY p.dateline DESC LIMIT 5

Displays last 5 threads created, in phpmyadmin:
SELECT * FROM mybb_threads ORDER BY dateline DESC LIMIT 5

You can delete selected threads/posts by replacing "select" with "delete".
--
After you are done, make sure to recount threads/posts in your admin panel.
Good luck!