mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Merge pull request #11066 from jirikrepl/print-verify-url-in-development
feat: print email verification URL in development
This commit is contained in:
@@ -186,7 +186,7 @@ Accounts.findUserByUsername =
|
||||
* @returns {Object} A user if found, else null
|
||||
* @importFromPackage accounts-base
|
||||
*/
|
||||
Accounts.findUserByEmail =
|
||||
Accounts.findUserByEmail =
|
||||
(email, options) => Accounts._findUserByQuery({ email }, options);
|
||||
|
||||
// Generates a MongoDB selector that can be used to perform a fast case
|
||||
@@ -769,6 +769,9 @@ Accounts.sendResetPasswordEmail = (userId, email, extraTokenData) => {
|
||||
const url = Accounts.urls.resetPassword(token);
|
||||
const options = Accounts.generateOptionsForEmail(realEmail, user, url, 'resetPassword');
|
||||
Email.send(options);
|
||||
if (Meteor.isDevelopment) {
|
||||
console.log(`\nReset password URL: ${url}`);
|
||||
}
|
||||
return {email: realEmail, user, token, url, options};
|
||||
};
|
||||
|
||||
@@ -795,6 +798,9 @@ Accounts.sendEnrollmentEmail = (userId, email, extraTokenData) => {
|
||||
const url = Accounts.urls.enrollAccount(token);
|
||||
const options = Accounts.generateOptionsForEmail(realEmail, user, url, 'enrollAccount');
|
||||
Email.send(options);
|
||||
if (Meteor.isDevelopment) {
|
||||
console.log(`\nEnrollment email URL: ${url}`);
|
||||
}
|
||||
return {email: realEmail, user, token, url, options};
|
||||
};
|
||||
|
||||
@@ -909,6 +915,9 @@ Accounts.sendVerificationEmail = (userId, email, extraTokenData) => {
|
||||
const url = Accounts.urls.verifyEmail(token);
|
||||
const options = Accounts.generateOptionsForEmail(realEmail, user, url, 'verifyEmail');
|
||||
Email.send(options);
|
||||
if (Meteor.isDevelopment) {
|
||||
console.log(`\nVerification email URL: ${url}`);
|
||||
}
|
||||
return {email: realEmail, user, token, url, options};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user