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 });
};
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();

View File

@ -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