X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d90f353e5f30c35fdfc61a462fdb39b3504998ce..316ce7b4e94cf92ee4e231417f5ef741a1619119:/app/controllers/users/lists_controller.rb diff --git a/app/controllers/users/lists_controller.rb b/app/controllers/users/lists_controller.rb index a2f35e9b2..7e3fa2a32 100644 --- a/app/controllers/users/lists_controller.rb +++ b/app/controllers/users/lists_controller.rb @@ -13,10 +13,11 @@ module Users ## # display a list of users matching specified criteria def show - @params = params.permit(:status, :ip, :before, :after) + @params = params.permit(:status, :username, :ip, :before, :after) users = User.all users = users.where(:status => @params[:status]) if @params[:status].present? + users = users.where("LOWER(email) = LOWER(?) OR LOWER(NORMALIZE(display_name, NFKC)) = LOWER(NORMALIZE(?, NFKC))", @params[:username], @params[:username]) if @params[:username].present? users = users.where("creation_address <<= ?", @params[:ip]) if @params[:ip].present? @users_count = users.limit(501).count