From 91760d284b888895e036bccb385166eba43325b0 Mon Sep 17 00:00:00 2001 From: farhatahmad <35435341+farhatahmad@users.noreply.github.com> Date: Tue, 7 May 2019 09:03:02 -0400 Subject: [PATCH] Added check to make sure user is signed in (#499) --- app/helpers/theming_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/theming_helper.rb b/app/helpers/theming_helper.rb index 58f0def3..e3f073fb 100644 --- a/app/helpers/theming_helper.rb +++ b/app/helpers/theming_helper.rb @@ -31,7 +31,7 @@ module ThemingHelper # Returns the user's provider in the settings context def user_settings_provider - if Rails.configuration.loadbalanced_configuration && !current_user&.has_role?(:super_admin) + if Rails.configuration.loadbalanced_configuration && current_user && !current_user&.has_role?(:super_admin) current_user.provider elsif Rails.configuration.loadbalanced_configuration @user_domain