Applied as reviewed by @flowersinthesand

This commit is contained in:
박대선 2016-12-23 14:47:08 +09:00
parent d9ae32429b
commit 697614dd45
1 changed files with 2 additions and 2 deletions

View File

@ -858,9 +858,9 @@ module.exports = function(User) {
if (emailChanged && ctx.Model.settings.emailVerificationRequired) {
ctx.instance.emailVerified = false;
}
} else {
} else if (ctx.data.email) {
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) {
ctx.data.emailVerified = false;