diff --git a/app/controllers/user_sessions_controller.rb b/app/controllers/user_sessions_controller.rb index 0e8eb7d0fcb..79bc6f14594 100644 --- a/app/controllers/user_sessions_controller.rb +++ b/app/controllers/user_sessions_controller.rb @@ -137,6 +137,9 @@ def handle_site_login_flow redirect_to return_to + hash_params elsif session[:return_to] return_to = session[:return_to] + if return_to == '/login' + return_to = '/dashboard' + end session[:return_to] = nil redirect_to return_to + hash_params elsif params[:return_to]