MyBB Community Forums

Full Version: How to delete all banned members at once
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi in my forum there are 500 banned members and i want to remove them completely. How to do this via MySQL ?
Please help me ASAP
DELETE FROM prefix_users WHERE usergroup="7"

where prefix is your table prefix.
its better to use the user pruning from ACP >> Tools and Maintenance >> Task Manager

also check this reply: http://community.mybb.com/thread-113807-...#pid842305
A solution without PHP edit is also:

AdminCP->Users&Groups->Options for Banned Users->select "List Users".

Then skip through all pages en check "select all" for each page. When finished choose "Delete Users" and click "Go".

Will be perhaps 2 minutes work foor 500 users (25 pages).
How to delete using task manager and please tell me also how to delete from SQL please tell me step by step
(2015-02-13, 07:01 AM)Rock On Wrote: [ -> ]How to delete using task manager and please tell me also how to delete from SQL please tell me step by step

(2015-02-06, 11:01 AM)Ad Bakker Wrote: [ -> ]DELETE FROM prefix_users WHERE usergroup="7"

where prefix is your table prefix.

Use what Ad Bakker posted. I'm wondering why you want to delete banned users. I would think they were banned for a reason and if you delete their account they would be able to register again rather easily.
They all are bots so i dont think that they will register again, and banned user also make large database so i want to delete them...
Where I add these codes in phpMyAdmin..???

DELETE FROM prefix_users WHERE usergroup="7"

where prefix is your table prefix.

[Image: Untitled.jpg]
you need to run them from your phpmyadmin on your webhost panel.... Read this thread to know how to run sql queries


DELETE FROM mybb_users WHERE usergroup="7"


NOTE: deleting members from db using the sql query will just remove the users and not their posts.. hence the posts which are posted by those users will stay but with no profile connected to it... if you wish to delete those user's posts as well you need to use the User Pruning method... if only the users are to be deleted then the sql query is better...
Please see the image

[Image: Untitled.jpg]

And also please tell me user pruning method

Oh i got it but please tell me USER PRUNING METHOD...
Doing it with phpMyAdmin is not recommended. That single query will only delete the records from the users table, while the MyBB core userhandler uses at least ~25 queries to remove most things associated wth the user and even that is incomplete.

So you should use the ACP deletion:
1. Use Find Users to find all accounts in the banned group. You can enter a very high Results per page number for quicker selection.
2. Use the checkbox near Users (All Users) to select everyone.
3. In Inline User Moderation choose Delete User(s) and Go.