Merge pull request #17290 from raisedadead/fix/deprecated-signin

fix: remove compulsion on update email
This commit is contained in:
Stuart Taylor
2018-05-30 22:03:15 +01:00
committed by GitHub
2 changed files with 4 additions and 4 deletions

View File

@ -518,11 +518,11 @@ module.exports = function(User) {
)({ ttl }); )({ ttl });
}; };
User.prototype.getEncodedEmail = function getEncodedEmail() { User.prototype.getEncodedEmail = function getEncodedEmail(email) {
if (!this.email) { if (!email) {
return null; return null;
} }
return Buffer(this.email).toString('base64'); return Buffer(email).toString('base64');
}; };
User.decodeEmail = email => Buffer(email, 'base64').toString(); User.decodeEmail = email => Buffer(email, 'base64').toString();

View File

@ -19,7 +19,7 @@ export default function emailNotVerifiedNotice() {
const { user } = req; const { user } = req;
if (user && (!user.email || user.email === '' || !user.emailVerified)) { if (user && (!user.email || user.email === '' || !user.emailVerified)) {
req.flash( req.flash(
'danger', 'info',
dedent` dedent`
New privacy laws now require that we have an email address where we can reach 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 you. Please verify your email address below and click the link we send you to