From 56794cf869093aa43614dec744eb64a63049dbcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 3 Oct 2023 20:16:01 -0400 Subject: [PATCH] fix: only show emailChanged alert for self --- src/user/interstitials.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/user/interstitials.js b/src/user/interstitials.js index c16cb48ff0..1be2b9040c 100644 --- a/src/user/interstitials.js +++ b/src/user/interstitials.js @@ -97,7 +97,9 @@ Interstitials.email = async (data) => { }).catch((err) => { winston.error(`[user.interstitials.email] Validation email failed to send\n[emailer.send] ${err.stack}`); }); - data.req.session.emailChanged = 1; + if (isSelf) { + data.req.session.emailChanged = 1; + } } else { // User attempting to edit another user's email -- not allowed throw new Error('[[error:no-privileges]]');