From 3cc580145ba282b33aab1d2f0c59b7bd906f065c Mon Sep 17 00:00:00 2001 From: Mike Cifelli <26522946+macifell@users.noreply.github.com> Date: Wed, 17 Jan 2024 16:25:46 -0500 Subject: [PATCH] Case insensitive email comparison (#139) --- lib/recognizer_web/controllers/helpers.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/recognizer_web/controllers/helpers.ex b/lib/recognizer_web/controllers/helpers.ex index df07993..25ab131 100644 --- a/lib/recognizer_web/controllers/helpers.ex +++ b/lib/recognizer_web/controllers/helpers.ex @@ -8,7 +8,9 @@ defmodule RecognizerWeb.Controllers.Helpers do import Plug.Conn, only: [get_session: 2, assign: 3] def get_email_from_request(conn) do - conn.params["user"]["email"] + (conn.params["user"]["email"] || "") + |> String.trim() + |> String.downcase() end def get_user_id_from_request(conn) do