Couldn't unban user after i run this sql query

rolypoly

Member
i want to the spammers so what i did is ban all users with zero postcount.

Code:
UPDATE xf_user SET is_banned = '1' WHERE xf_user.message_count = 0;
now, i couldn't unban user in admin. it say : couldn't find user

please kindly advice.


corrected the query.
 
Last edited:

Jeremy

Well-known member
The query you posted shouldn't have banned a user. How are you trying to ban a user?
 

rolypoly

Member
sorry.. i have update the post with my query..

the query did ban the user by set their is_banned to 1 in phpmyadmin
 

Mike

XenForo developer
Staff member
You can't ban people like that. You need to ban them from the control panel.

In general, if you run queries on the database, you run the risk of putting your system in an unknown and inconsistent state, leading to more/other problems down the line.
 

rolypoly

Member
You can't ban people like that. You need to ban them from the control panel.

In general, if you run queries on the database, you run the risk of putting your system in an unknown and inconsistent state, leading to more/other problems down the line.
omg..
because i have alot of spammers...i wonder how to ban them in a quick way..
do you have solution?
 
Top