meteor-useraccounts / core

Meteor sign up and sign in templates' core functionalities
http://useraccounts.meteor.com/
MIT License
529 stars 278 forks source link

Handle multiple addresses properly when resending verification mails #760

Open Wicloz opened 6 years ago

Wicloz commented 6 years ago

Take 2

When sending a verification mail the intended address can be supplied as a second parameter. In the case multiple unverified addresses are available, this will ensure the mail is send to the address the user intended, rather than the first one.

Supplying the email address as a parameter also allows verification mails to be sent to addresses which are already verified. As such, the error handling which turns every possible error that could occur when sending a mail into "Already verified" has been removed, and a separate check to prevent sending verification mails to verified addresses is added.