From 125cc1d0482c92b5c71c6a05c7f888268b5e54e5 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 7 Mar 2022 04:45:19 -0600 Subject: [PATCH] users: fix lockout of invalid usernames (525acd17a) --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9012b2d09..cd8ea2578 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -200,7 +200,7 @@ class ApplicationController < ActionController::Base end def redirect_if_name_invalid? - if request.format.html? && CurrentUser.user.name_invalid? + if request.format.html? && !CurrentUser.user.is_anonymous? && CurrentUser.user.name_invalid? flash[:notice] = "You must change your username to continue using #{Danbooru.config.app_name}" redirect_to new_user_name_change_request_path end