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

XF 1.3 ACP "Banned Users" has entries for non-existant users

Discussion in 'Troubleshooting and Problems' started by Kevin, Jun 3, 2014.

  1. Kevin

    Kevin Well-Known Member

    When viewing "Banned Users" in the ACP entries are showing with no user name. Clicking on the entry gives shows the xf_user_ban data. Clicking on "User Info" shows "The requested user could not be found" and looking in xf_user confirms that the user entry is not there.

    So the question really is.... what's the best way of clearing up xf_user_ban to get rid of entries for users that don't exist? :D
     
  2. Mike

    Mike XenForo Developer Staff Member

    You could likely delete them with a query that left joined to the xf_user table and removed the ones without a matching user. I wouldn't totally recommend that just from an ease-of-mistakes perspective.

    You may just need to remove them manually via the DB.
     
  3. Kevin

    Kevin Well-Known Member

    Because of the volume of entries, over 400, I went with a join on the delete command.
    Code:
    delete xfban
    from xf_user_ban as xfban
    left join xf_user as xfuser on xfban.user_id = xfuser.user_id
    where xfuser.user_id IS NULL
     

Share This Page