mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 03:08:23 +08:00
FIX: participating users statistics... (#29293)
* FIX: participating users statistics... ... was (mis-)counting - bots - anonymous users - suspended users There's now a "valid_users" function that holds the AR query for valid users and which is used in all "users", "active_users", and "participating_users" queries. Internal ref - t/138435
This commit is contained in:
@ -303,6 +303,7 @@ class User < ActiveRecord::Base
|
||||
scope :not_suspended, -> { where("suspended_till IS NULL OR suspended_till <= ?", Time.zone.now) }
|
||||
scope :activated, -> { where(active: true) }
|
||||
scope :not_staged, -> { where(staged: false) }
|
||||
scope :approved, -> { where(approved: true) }
|
||||
|
||||
scope :filter_by_username,
|
||||
->(filter) do
|
||||
|
Reference in New Issue
Block a user