Applied as reviewed by @flowersinthesand
This commit is contained in:
parent
d9ae32429b
commit
697614dd45
|
@ -858,9 +858,9 @@ module.exports = function(User) {
|
||||||
if (emailChanged && ctx.Model.settings.emailVerificationRequired) {
|
if (emailChanged && ctx.Model.settings.emailVerificationRequired) {
|
||||||
ctx.instance.emailVerified = false;
|
ctx.instance.emailVerified = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else if (ctx.data.email) {
|
||||||
var emailChanged = ctx.hookState.originalUserData.some(function(data) {
|
var emailChanged = ctx.hookState.originalUserData.some(function(data) {
|
||||||
return ctx.data.email && data.email != ctx.data.email;
|
return data.email != ctx.data.email;
|
||||||
});
|
});
|
||||||
if (emailChanged && ctx.Model.settings.emailVerificationRequired) {
|
if (emailChanged && ctx.Model.settings.emailVerificationRequired) {
|
||||||
ctx.data.emailVerified = false;
|
ctx.data.emailVerified = false;
|
||||||
|
|
Loading…
Reference in New Issue