fix: email validation flow, so that it actually works, fixed event logging bug, new email verification template

This commit is contained in:
Julian Lam
2021-07-23 17:22:19 -04:00
parent caf8968791
commit 3bcd1f1438
7 changed files with 38 additions and 13 deletions

View File

@@ -114,6 +114,8 @@ module.exports = function (User) {
if (userData.email && userData.uid > 1) {
User.email.sendValidationEmail(userData.uid, {
email: userData.email,
template: 'welcome',
subject: `[[email:welcome-to, ${meta.config.title || meta.config.browserTitle || 'NodeBB'}]]`,
}).catch(err => winston.error(`[user.create] Validation email failed to send\n[emailer.send] ${err.stack}`));
}
if (userNameChanged) {