DEV: Add plugin modifier locations for user search locations (#23169)
This commit is contained in:
parent
f179eef6ae
commit
730f652255
|
@ -198,7 +198,8 @@ class UserSearch
|
|||
|
||||
def search
|
||||
ids = search_ids
|
||||
return User.where("0=1") if ids.empty?
|
||||
ids = DiscoursePluginRegistry.apply_modifier(:user_search_ids, ids)
|
||||
return User.none if ids.empty?
|
||||
|
||||
results =
|
||||
User.joins(
|
||||
|
|
|
@ -939,6 +939,8 @@ class Search
|
|||
users = users.where(suspended_at: nil)
|
||||
end
|
||||
|
||||
users = DiscoursePluginRegistry.apply_modifier(:search_user_search, users)
|
||||
|
||||
users_custom_data_query =
|
||||
DB.query(<<~SQL, user_ids: users.pluck(:id), term: "%#{@original_term.downcase}%")
|
||||
SELECT user_custom_fields.user_id, user_fields.name, user_custom_fields.value FROM user_custom_fields
|
||||
|
|
Loading…
Reference in New Issue