From 4e5340d260c97870c9ccab941ebb45cafc027661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 31 Aug 2023 09:34:15 -0400 Subject: [PATCH] refactor: add targetUid to email-change event --- src/user/email.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/user/email.js b/src/user/email.js index 9a18a62e34..c54a986828 100644 --- a/src/user/email.js +++ b/src/user/email.js @@ -204,7 +204,12 @@ UserEmail.confirmByCode = async function (code, sessionId) { await Promise.all([ UserEmail.confirmByUid(confirmObj.uid), db.delete(`confirm:${code}`), - events.log({ type: 'email-change', oldEmail, newEmail: confirmObj.email }), + events.log({ + type: 'email-change', + oldEmail, + newEmail: confirmObj.email, + targetUid: confirmObj.uid, + }), ]); };