Jump to content
WebFlake
  • 0

How do I delete all members except me?


Norg

Question

Hi there,

 

I'm trying to delete all of the members on my new board since all 1k+ are spam. I'd like to do this with a MySQL query or something and if possible to add all the IP's and emails to the ban list.

 

Thank You.

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

You must run the commands in this order:

insert ignore into banfilters (ban_type,ban_content,ban_date) 
 select 'ip', ip_address, CURRENT_TIMESTAMP from members where member_id > 1;

insert ignore into banfilters (ban_type,ban_content,ban_date) 
 select 'email', email, CURRENT_TIMESTAMP from members where member_id > 1;

delete from members where member_id > 1; 

Be sure to backup tables banfilters and members or the wholde database first. If you have a prefix like ibf_ it must be added to in front of the table name.

 

You can run these commands in sql toolbox in acp or in phpmyadmin. 

 

 

Link to comment
Share on other sites

  • 0

I am unsure how you would be able to add them to a ban list, sadly, but here is a MySQL query to remove all users except for you:

 

 

Remember

*Replace database with your IPB database name

DELETE FROM `database`.`members` WHERE `members`.`member_id` != 1

If your account is ID 2, use this command:

DELETE FROM `database`.`members` WHERE !(member_id = 1 AND member_id = 2)
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...