Skip to content

Commit

Permalink
Case insensitive email comparison (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
macifell authored Jan 17, 2024
1 parent aeea685 commit 3cc5801
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/recognizer_web/controllers/helpers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3cc5801

Please sign in to comment.