about summary refs log tree commit diff
path: root/app/presenters
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-11-27 18:49:37 +0100
committerGitHub <noreply@github.com>2018-11-27 18:49:37 +0100
commit81f96c973afab8b8357651dd55bc7b086d512935 (patch)
tree5eb847417aacebc36420360d043d0f78b25d41d7 /app/presenters
parent43c311b3a101d7364f10365c1a7a19374d539e93 (diff)
Don't count suspended users in user count (#9380)
Fix #7637
Diffstat (limited to 'app/presenters')
-rw-r--r--app/presenters/instance_presenter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/presenters/instance_presenter.rb b/app/presenters/instance_presenter.rb
index 093c8ff32..dc77162d4 100644
--- a/app/presenters/instance_presenter.rb
+++ b/app/presenters/instance_presenter.rb
@@ -18,7 +18,7 @@ class InstancePresenter
   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