Brent W Well-known member Sep 13, 2013 #1 I recently imported a forum and the user bans did not transfer over for some reason. I have a list of userids I would like to ban on xenForo. Is there a simple query to do this correctly?
I recently imported a forum and the user bans did not transfer over for some reason. I have a list of userids I would like to ban on xenForo. Is there a simple query to do this correctly?
AndyB Well-known member Sep 13, 2013 #4 You can use phpmyadmin and run a query like this example: Code: UPDATE xf_user SET is_banned='1' WHERE user_id='1' OR user_id='2' Edit your list to the following format user_id='1' OR user_id='2' etc... Once your list is updated to the proper format, copy and paste in into the query. Always backup your database before running such a query. Upvote 0 Downvote
You can use phpmyadmin and run a query like this example: Code: UPDATE xf_user SET is_banned='1' WHERE user_id='1' OR user_id='2' Edit your list to the following format user_id='1' OR user_id='2' etc... Once your list is updated to the proper format, copy and paste in into the query. Always backup your database before running such a query.
Brent W Well-known member Sep 13, 2013 #5 Thanks. I was wondering if that was the only place that needs to be updated as I also see there is a user_ban table. Upvote 0 Downvote
Thanks. I was wondering if that was the only place that needs to be updated as I also see there is a user_ban table.
AndyB Well-known member Sep 13, 2013 #6 I overlooked the xf_user_ban table. In this case it looks like writing a short PHP script to update both tables is the best solution. Upvote 0 Downvote
I overlooked the xf_user_ban table. In this case it looks like writing a short PHP script to update both tables is the best solution.