Search users on login and full name (in their profile).
This commit is contained in:
parent
7b14d4a971
commit
7e1277e2d1
@ -406,7 +406,14 @@ class AuthD::Service
|
||||
|
||||
users = @users.to_a
|
||||
users.each do |u|
|
||||
if pattern =~ u.login
|
||||
if pattern =~ u.login || u.profile.try do |profile|
|
||||
full_name = profile["full_name"]?
|
||||
if full_name.nil?
|
||||
false
|
||||
else
|
||||
pattern =~ full_name.as_s
|
||||
end
|
||||
end
|
||||
puts "#{u.login} matches #{pattern}"
|
||||
matching_users << u.to_public
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user