Skip to content

Commit

Permalink
Fixes bug where a user was given a false positive that their old veri…
Browse files Browse the repository at this point in the history
…fication token worked.
  • Loading branch information
ajmueller committed Aug 9, 2016
1 parent aefb775 commit fea252e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions controllers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,11 @@ exports.verify = {
return res.redirect('/');
}

if (!user) {
req.flash('errors', { msg: 'Your verification token is invalid. Please enter your email address below to receive a new verification token.' });
return res.redirect('/user/verify-resend');
}

req.flash('success', { msg: 'Your email address has been verified. You may now log in.' });
res.redirect('/user/login');
});
Expand Down

0 comments on commit fea252e

Please sign in to comment.