mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 07:49:48 +08:00
FEATURE: user directory returns staged users during search
This commit is contained in:
@ -9,6 +9,7 @@ class UserSearch
|
||||
@topic_id = opts[:topic_id]
|
||||
@topic_allowed_users = opts[:topic_allowed_users]
|
||||
@searching_user = opts[:searching_user]
|
||||
@include_staged_users = opts[:include_staged_users] || false
|
||||
@limit = opts[:limit] || 20
|
||||
@group = opts[:group]
|
||||
@guardian = Guardian.new(@searching_user)
|
||||
@ -16,7 +17,8 @@ class UserSearch
|
||||
end
|
||||
|
||||
def scoped_users
|
||||
users = User.where(active: true, staged: false)
|
||||
users = User.where(active: true)
|
||||
users = users.where(staged: false) unless @include_staged_users
|
||||
|
||||
if @group
|
||||
users = users.where('users.id IN (
|
||||
|
Reference in New Issue
Block a user