MyBB Community Forums

Full Version: Delete unregistered users?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Okay,

I have almost 200+ spammers that have attempted to register and are awaiting activation (yes I did a search but stopped looking after page 8 or so).

Is there a way to go in and remove users that are awaiting activation without doing one at a time? It would be nice to be able to select more that one.

If you have any thoughts I would be grateful.
DELETE FROM `mybb_users` WHERE `usergroup` = '5';
TRUNCATE `mybb_awaitingactivation`;

Run those in phpMyAdmin.
Matt thanks, but one quick add on, is there a way to add a before date so I don't kill off users that just signed on?

adding a date range or before date...? My sql table knowledge for the forum is not very high as of yet... but if this was a Call Center Phone system Smile
OK, use these two instead:

DELETE FROM `mybb_users` WHERE `usergroup` = '5' AND `regdate` < '1265846400';
DELETE FROM `mybb_awaitingactivation` WHERE `dateline` < '1265846400';

This will get rid of people who have been awaiting activation for 2 weeks or more. If you'd want a different time scale, let me know.
You are the man! now for my future knowledge can you break down the date info?
Basically 1265846400 is the timestamp (number of seconds since 1st Jan 1970) of 11th Feb 2010, 2 weeks ago. Then the queries say to delete where the date was smaller than 1265846400 (i.e. before 11th Feb), so it doesn't delete it if it was after 11th Feb.
Ok that is something I am not used to... so who chose the 1st of Jan 1970, if I may ask without dragging this out too far?
Thank you Darkly... Now that I think about this... I have seen this before, just don't use it often.