From b7843c6047484412c21803cf4472857a411239b3 Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra Date: Thu, 31 May 2018 01:35:24 +0530 Subject: [PATCH 1/2] fix: update alert style --- server/middlewares/email-not-verified-notice.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/middlewares/email-not-verified-notice.js b/server/middlewares/email-not-verified-notice.js index 0c53d14797..7cdd6f42e4 100644 --- a/server/middlewares/email-not-verified-notice.js +++ b/server/middlewares/email-not-verified-notice.js @@ -19,7 +19,7 @@ export default function emailNotVerifiedNotice() { const { user } = req; if (user && (!user.email || user.email === '' || !user.emailVerified)) { req.flash( - 'danger', + 'info', dedent` New privacy laws now require that we have an email address where we can reach you. Please verify your email address below and click the link we send you to From 746a416b7f1522bc0383cc7cfcafab83a988eac6 Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra Date: Thu, 31 May 2018 01:36:43 +0530 Subject: [PATCH 2/2] fix: remove email update compulsion --- common/models/user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/models/user.js b/common/models/user.js index 69472224ff..fb53ab216e 100644 --- a/common/models/user.js +++ b/common/models/user.js @@ -518,11 +518,11 @@ module.exports = function(User) { )({ ttl }); }; - User.prototype.getEncodedEmail = function getEncodedEmail() { - if (!this.email) { + User.prototype.getEncodedEmail = function getEncodedEmail(email) { + if (!email) { return null; } - return Buffer(this.email).toString('base64'); + return Buffer(email).toString('base64'); }; User.decodeEmail = email => Buffer(email, 'base64').toString();