Small code improvement for lookup of existing customer.

This commit is contained in:
Martin Edenhofer 2018-02-02 21:06:55 +01:00
parent 026a153ebb
commit 9cc1c471a3

View file

@ -124,7 +124,7 @@ class TicketsController < ApplicationController
if !local_customer && clean_customer[:id].present?
local_customer = User.find_by(id: clean_customer[:id])
end
if clean_customer[:email].present?
if !local_customer && clean_customer[:email].present?
local_customer = User.find_by(email: clean_customer[:email].downcase)
end
if !local_customer && clean_customer[:login].present?