Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update handling of e-mail confirmation #259

Merged
merged 1 commit into from
Aug 24, 2019

Conversation

danschultzer
Copy link
Collaborator

A bunch of refactoring after #255, made the tests and mocks more readable, and fixed the following logic:

  • Updated PowEmailConfirmation.Ecto.Schema.changeset/3 so;
    • when :email is identical to :unconfirmed_email it won't generate new :email_confirmation_token
    • when :email is identical to the persisted :email value both :email_confirmation_token and :unconfirmed_email will be set to nil
    • when there is no :email value in the params nothing happens
  • Updated PowEmailConfirmation.Ecto.Schema.confirm_email_changeset/1 so now :email_confirmation_token is set to nil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant