• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Couldn't unban user after i run this sql query

#1
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:

Mike

XenForo developer
Staff member
#5
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.
 
#6
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?