mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-22 18:19:52 +02:00
fix: only show emailChanged alert for self
This commit is contained in:
@@ -97,7 +97,9 @@ Interstitials.email = async (data) => {
|
|||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
winston.error(`[user.interstitials.email] Validation email failed to send\n[emailer.send] ${err.stack}`);
|
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 {
|
} else {
|
||||||
// User attempting to edit another user's email -- not allowed
|
// User attempting to edit another user's email -- not allowed
|
||||||
throw new Error('[[error:no-privileges]]');
|
throw new Error('[[error:no-privileges]]');
|
||||||
|
|||||||
Reference in New Issue
Block a user