Skip to content
Snippets Groups Projects
Unverified Commit b21135f4 authored by Andrej Shadura's avatar Andrej Shadura
Browse files

Allow looking up users by an email address

parent 72d7191b
Branches
Tags
No related merge requests found
Pipeline #29741 passed
...@@ -13,6 +13,8 @@ class PersonController < ApplicationController ...@@ -13,6 +13,8 @@ class PersonController < ApplicationController
def show def show
if params[:prefix] if params[:prefix]
@list = User.where("login LIKE ?", params[:prefix] + '%') @list = User.where("login LIKE ?", params[:prefix] + '%')
elsif params[:email]
@list = User.where(:email => email)
else else
@list = User.all @list = User.all
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment