mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:47:22 +08:00
correct bad merge
This commit is contained in:
parent
ad3dd161e7
commit
f6390c8ad6
|
@ -205,10 +205,13 @@ class UsersController < ApplicationController
|
|||
usernames = [params[:username]] if usernames.blank?
|
||||
usernames.each(&:downcase!)
|
||||
|
||||
groups = Group.where(name: users).pluck(:name)
|
||||
users -= groups
|
||||
groups = Group.where(name: usernames).pluck(:name)
|
||||
usernames -= groups
|
||||
|
||||
result = User.where(staged: false)
|
||||
.where(username_lower: usernames)
|
||||
.pluck(:username_lower)
|
||||
|
||||
result = User.where(staged: false).where(username_lower: users).pluck(:username_lower)
|
||||
render json: {valid: result, valid_groups: groups}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user