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