Skip to content

Node.js based forum software built for the modern web

fix: only show emailChanged alert for self

Barış Soner Uşaklı56794cf86909
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]]');