redirect disabled user to homepage

This commit is contained in:
Vishal Jain
2022-06-24 18:09:15 +05:30
parent 0ce5718b2b
commit 84b711e130

View File

@@ -165,8 +165,9 @@ class ApplicationController < ActionController::Base
return unless current_spree_user.disabled
flash[:success] = nil
flash.now[:error] = I18n.t("devise.failure.disabled")
flash[:error] = I18n.t("devise.failure.disabled")
sign_out current_spree_user
redirect_to main_app.root_path
end
end