mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FEATURE: user directory returns staged users during search
This commit is contained in:
@ -23,7 +23,7 @@ class DirectoryItemsController < ApplicationController
|
||||
|
||||
user_ids = nil
|
||||
if params[:name].present?
|
||||
user_ids = UserSearch.new(params[:name]).search.pluck(:id)
|
||||
user_ids = UserSearch.new(params[:name], include_staged_users: true).search.pluck(:id)
|
||||
if user_ids.present?
|
||||
# Add the current user if we have at least one other match
|
||||
if current_user && result.dup.where(user_id: user_ids).exists?
|
||||
|
Reference in New Issue
Block a user