Since the creation of the user happens asynchronously, the node process dies before it has created the user or sent the mail.

This commit is contained in:
Torben 2024-04-15 14:45:40 +02:00
parent 1a7f6514a4
commit 78bd986d0e

View file

@ -114,7 +114,7 @@ const UserRegistrationHandler = {
const setNewPasswordUrl = `${settings.siteUrl}/user/activate?token=${token}&user_id=${user._id}` const setNewPasswordUrl = `${settings.siteUrl}/user/activate?token=${token}&user_id=${user._id}`
try { try {
EmailHandler.promises.sendEmail('registered', { await EmailHandler.promises.sendEmail('registered', {
to: user.email, to: user.email,
setNewPasswordUrl, setNewPasswordUrl,
}) })