瀏覽代碼
Don't count suspended users in user count (#9380)
Fix #7637
master
Eugen Rochko
5 年之前
committed by
GitHub
沒有發現已知的金鑰在資料庫的簽署中
GPG 金鑰 ID: 4AEE18F83AFDEB23
共有
1 個檔案被更改,包括
1 行新增 和
1 行删除
-
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 |
|
|
|