From 2d534bf2e0a835ba04163ebec3d3ba9d4d365ab6 Mon Sep 17 00:00:00 2001 From: Martin Brennan Date: Wed, 27 May 2020 10:05:06 +1000 Subject: [PATCH] FIX: Pass current_user to TopicQuery in for categories_and_top_topics (#9885) --- app/controllers/categories_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb index 8fc6ad79bf8..20e02ab0613 100644 --- a/app/controllers/categories_controller.rb +++ b/app/controllers/categories_controller.rb @@ -57,7 +57,7 @@ class CategoriesController < ApplicationController @topic_list = TopicQuery.new(current_user, topic_options).list_latest @topic_list.more_topics_url = url_for(public_send("latest_path")) elsif style == "categories_and_top_topics" - @topic_list = TopicQuery.new(nil, topic_options).list_top_for(SiteSetting.top_page_default_timeframe.to_sym) + @topic_list = TopicQuery.new(current_user, topic_options).list_top_for(SiteSetting.top_page_default_timeframe.to_sym) @topic_list.more_topics_url = url_for(public_send("top_path")) end