Pow v1.0.14 PowEmailConfirmation.Phoenix.ControllerCallbacks View Source
Controller callback logic for e-mail confirmation.
User hasn't confirmed e-mail
Triggers on Pow.Phoenix.RegistrationController.create/2
or
Pow.Phoenix.SessionController.create/2
.
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, and the
user redirected back to Pow.Phoenix.Routes.after_registration_path/1
or
Pow.Phoenix.Routes.after_registration_path/1
respectively.
User updates e-mail
Triggers on Pow.Phoenix.RegistrationController.update/2
and
PowInvitation.Phoenix.InvitationController.update/2
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.
See PowEmailConfirmation.Ecto.Schema
for more.
Link to this section Summary
Functions
Callback implementation for Pow.Extension.Phoenix.ControllerCallbacks.Base.before_process/4
.
See Pow.Phoenix.Controller.messages/2
for more.
See Pow.Phoenix.Controller.routes/2
for more.
Sends a confirmation e-mail to the user.
Link to this section Functions
before_process(controller, action, res, config)
View Sourcebefore_process(atom(), atom(), any(), Pow.Config.t()) :: any()
Callback implementation for Pow.Extension.Phoenix.ControllerCallbacks.Base.before_process/4
.
See Pow.Phoenix.Controller.messages/2
for more.
Pow.Phoenix.Messages
is used as fallback.
See Pow.Phoenix.Controller.routes/2
for more.
Pow.Phoenix.Routes
is used as fallback.
send_confirmation_email(user, conn)
View Sourcesend_confirmation_email(map(), Plug.Conn.t()) :: any()
Sends a confirmation e-mail to the user.
The user struct passed to the mailer will have the :email
set to the
:unconfirmed_email
value if :unconfirmed_email
is set.