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:
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.
 
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?
 
Back
Top Bottom