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

XF 1.2 Banned Member Able To Post?

Discussion in 'Troubleshooting and Problems' started by ProCom, Oct 24, 2013.

  1. ProCom

    ProCom Active Member

    I imported all my banned members from PunBB / FluxBB. It seemed like all the info in the "Banned Users" section of ACP was correct.

    Today an old banned member came to the forum and posted a reply to a thread.

    I thought the bans maybe weren't imported correctly so I quickly went in to ban him, but when I clicked the ban submit I received this error:


    The ban settings for this user:

    So, if the user is already banned, how come they were able to post in the forum?

    Any ideas on how I can fix this to make sure the banned members are really going to stay banned? I was going to send out a newsletter and now worry that a bunch of banned users may get the message and come create problems if the banned group isn't functioning properly

    :confused:
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    The custom importer not have properly imported the banned members. Is the member in the banned user group?
     
  3. Eoj Nawoh

    Eoj Nawoh Active Member

    Look at the permissions for the Banned users.
     
  4. Mike

    Mike XenForo Developer Staff Member

    There's no banned user group. :p

    But it does sound like an import issue - notably, the "is_banned" field not being set correctly.
     
  5. Jeremy

    Jeremy XenForo Moderator Staff Member

    *shows my way out the door* I knew that, flash backs to the last software I supported. :p I still fully think this is all your fault I thought this... I'm not sure why! hehe
     
  6. ProCom

    ProCom Active Member

    We don't have a banned user group, so at first I was hoping that was the problem... but I guess there isn't suppose to be a banned user group?

    If I go into ACP and search "Banned Users" for the person's username, they show up in that list.

    Is there possibly something I can do via PhpMyAdmin, or a query I can run to get the ban to stick?

    Here is what I see in the "user_ban" table for this user:

    upload_2013-10-24_11-15-33.png

    I just looked in xf_user table, and for this user the field is_banned is set to 0. I guess that needs to be set to 1 for all the imported bans?

    We have 400 banned users in the user_ban table. I guess we need to find a way to set them all as "is_banned" in xf_user?

    Thanks guys!!
     
  7. ProCom

    ProCom Active Member

    My query skills are terrible, so I'm thinking I might just export all the banned userID's into excel and create a concatenate that basically says: Update xf_users SET is_banned = 1 WHERE userId = x

    Will that do the trick? Is there an easier way to do this?
     
    BamaStangGuy likes this.
  8. Jeremy

    Jeremy XenForo Moderator Staff Member

    WHERE user_id IN (1,2,3,...,n)

    That should do it in one fell swoop, obviously after you build out the IDs into the array.
     
    BamaStangGuy likes this.
  9. ProCom

    ProCom Active Member

    Thanks! I finally just did the following:

    1. Exported all the userID's from the banned list into a csv (via phpmyadmin)
    2. In Excel, did a =CONCATENATE("UPDATE xf_user SET is_banned = '1' WHERE `user_id` = ",A1,";")
    3. Copied all 400 rows that were basically 400 rows of UPDATE xf_user SET is_banned = '1' WHERE `user_id` = 1237;
    4. Pasted into the SQL box in phpmyadmin
    5. DONE!
    Maybe not the best / most efficient way to do it, but it seemed to have worked.
    :)
     

Share This Page