From 78bd986d0ec7927548cbd9657ad0fee933731c3d Mon Sep 17 00:00:00 2001 From: Torben Date: Mon, 15 Apr 2024 14:45:40 +0200 Subject: [PATCH] Since the creation of the user happens asynchronously, the node process dies before it has created the user or sent the mail. --- services/web/app/src/Features/User/UserRegistrationHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/app/src/Features/User/UserRegistrationHandler.js b/services/web/app/src/Features/User/UserRegistrationHandler.js index 058cbceca5..c45c19b189 100644 --- a/services/web/app/src/Features/User/UserRegistrationHandler.js +++ b/services/web/app/src/Features/User/UserRegistrationHandler.js @@ -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, })