From 697614dd454797e450f03aefdbc73134ffd31a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EB=8C=80=EC=84=A0?= Date: Fri, 23 Dec 2016 14:47:08 +0900 Subject: [PATCH] Applied as reviewed by @flowersinthesand --- common/models/user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/models/user.js b/common/models/user.js index 7d5913df..cb54a11c 100644 --- a/common/models/user.js +++ b/common/models/user.js @@ -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;