View Source PowEmailConfirmation.Phoenix.ControllerCallbacks (Pow v1.0.27)
Controller callback logic for e-mail confirmation.
User hasn't confirmed e-mail
When a user is created or authenticated, and the current e-mail hasn't been
confirmed, a confirmation e-mail is sent, the session will be cleared, an
error flash is set for the
conn and the user redirected back to
User updates e-mail
When a user changes their e-mail, a confirmation e-mail is send to the new
e-mail, and an error flash is set for the
conn. The same happens if the
PowInvitation extension is enabled, and a user updates their e-mail when
accepting their invitation. It's assumed that the current e-mail for the
invited user has already been confirmed, see
PowInvitation.Ecto.Schema.invite_changeset/3 for more.
PowEmailConfirmation.Ecto.Schema for more.
Unique constraint error on
When a user can't be created and the changeset has a unique constraint error
pow_prevent_user_enumeration: false is set in
conn.private the form with error will be shown instead.
Link to this section Summary
Link to this section Functions
Sends a confirmation e-mail to the user.
The user struct passed to the mailer will have the
:unconfirmed_email value if
:unconfirmed_email is set.