From 58108b448159a8796500f2d3441cfe7b1ca99a67 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 27 Nov 2018 18:49:37 +0100 Subject: [PATCH] Don't count suspended users in user count (#9380) Fix #7637 --- app/presenters/instance_presenter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/presenters/instance_presenter.rb b/app/presenters/instance_presenter.rb index 9a9157f1bad645..bf33c7287c7749 100644 --- a/app/presenters/instance_presenter.rb +++ b/app/presenters/instance_presenter.rb @@ -18,7 +18,7 @@ def contact_account end def user_count - Rails.cache.fetch('user_count') { User.confirmed.count } + Rails.cache.fetch('user_count') { User.confirmed.joins(:account).merge(Account.without_suspended).count } end def status_count