Skip to content

Commit

Permalink
fix: only show emailChanged alert for self
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Oct 4, 2023
1 parent 90692d9 commit 56794cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/user/interstitials.js
Expand Up @@ -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]]');
Expand Down

0 comments on commit 56794cf

Please sign in to comment.