Skip to content

Commit

Permalink
Merge branch 'display-verification-prompt-email' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
macifell committed Feb 15, 2024
2 parents 7512093 + 5edb283 commit 9b8aeb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ defmodule RecognizerWeb.Accounts.Prompt.VerificationController do
]
when action in [:resend]

def new(%{assigns: %{user: %{verified_at: nil}}} = conn, _params) do
render(conn, "new.html", resend?: false)
def new(%{assigns: %{user: %{verified_at: nil} = user}} = conn, _params) do
render(conn, "new.html", resend?: false, email: user.email)
end

def new(%{assigns: %{user: user}} = conn, _params) do
Expand All @@ -33,7 +33,7 @@ defmodule RecognizerWeb.Accounts.Prompt.VerificationController do

def resend(%{assigns: %{user: %{verified_at: nil} = user}} = conn, _params) do
Accounts.resend_verification_code(user, &Routes.verification_code_url(conn, :new, &1))
render(conn, "new.html", resend?: true)
render(conn, "new.html", resend?: true, email: user.email)
end

def resend(%{assigns: %{user: user}} = conn, _params) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<div class="content has-text-centered">
<p>Almost there! Check your email and click the link to activate your account.</p>
<p><%= @email %></p>
<%= if @resend? do %>
<p>We've sent you another copy of the verification email.</p>
<% else %>
Expand Down

0 comments on commit 9b8aeb4

Please sign in to comment.