Skip to content

Commit

Permalink
fix: Email verification should be enough to validate account
Browse files Browse the repository at this point in the history
  • Loading branch information
stackexpress-shivam committed Sep 9, 2016
1 parent 235a324 commit f3b7e8f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/middleware/me.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ var me = module.exports = createMongooseMiddleware(User, {
);
function updateNewMail (req, res, next) {
req.body.email = req.me.email_new;
if (req.me.permission_level <= 1) {
req.body.permission_level = 2;
}
req.body.email_new = undefined;
req.body.email_change_token = undefined;
req.body.email_change_token_created = undefined;
Expand Down

0 comments on commit f3b7e8f

Please sign in to comment.