forked from shibao/cannery
show email in confirmation flash
This commit is contained in:
parent
bcceb0434d
commit
d9dd61b1a5
@ -32,9 +32,9 @@ defmodule CanneryWeb.UserConfirmationController do
|
|||||||
# leaked token giving the user access to the account.
|
# leaked token giving the user access to the account.
|
||||||
def confirm(conn, %{"token" => token}) do
|
def confirm(conn, %{"token" => token}) do
|
||||||
case Accounts.confirm_user(token) do
|
case Accounts.confirm_user(token) do
|
||||||
{:ok, _} ->
|
{:ok, %{email: email}} ->
|
||||||
conn
|
conn
|
||||||
|> put_flash(:info, dgettext("prompts", "User confirmed successfully."))
|
|> put_flash(:info, dgettext("prompts", "%{email} confirmed successfully.", email: email))
|
||||||
|> redirect(to: "/")
|
|> redirect(to: "/")
|
||||||
|
|
||||||
:error ->
|
:error ->
|
||||||
|
Loading…
Reference in New Issue
Block a user