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 4f113dc36a
commit 8d8f8189c0

View File

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