FIX: Pass current_user to TopicQuery in for categories_and_top_topics (#9885)

FIX: Pass current_user to TopicQuery in for categories_and_top_topics (#9885)

diff --git a/app/controllers/categories_controller.rb b/app/controllers/categories_controller.rb
index 8fc6ad7..20e02ab 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
 

GitHub sha: 2d534bf2

This commit appears in #9885 which was approved by pmusaraj. It was merged by martin.

Should there be a test?