1. 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

Discussion in 'XenForo Questions and Support' started by rolypoly, Jul 8, 2013.

  1. rolypoly

    rolypoly Member

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

    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: Jul 8, 2013
  2. Jeremy

    Jeremy Well-Known Member

    The query you posted shouldn't have banned a user. How are you trying to ban a user?
  3. rolypoly

    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
  4. Jeremy

    Jeremy Well-Known Member

    How exactly are you attempting to unban?
  5. Mike

    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.
  6. rolypoly

    rolypoly Member

    because i have alot of spammers...i wonder how to ban them in a quick way..
    do you have solution?
  7. Mike

    Mike XenForo Developer Staff Member

    I would recommend spam cleaning them individually.
  8. rolypoly

    rolypoly Member


    i have 20k+ spammers to ban.. :(

Share This Page