diff options
| author | HumairAK <humair88@hotmail.com> | 2016-07-27 18:02:27 +0000 |
|---|---|---|
| committer | HumairAK <humair88@hotmail.com> | 2016-07-27 18:02:27 +0000 |
| commit | 807b2b72e6b83339ecb4f5f23999ce8d22d9db46 (patch) | |
| tree | 493e30db6acba3785f539589a479a6dab394c1d8 /routes/user.js | |
| parent | 189c183337cf3281056d313c4724536e450a46fd (diff) | |
| parent | ce93c6f62b137c677ba2c237d07c54e59c05ae8a (diff) | |
Merge branch 'master' of https://github.com/HumairAK/solutions_repo
Diffstat (limited to 'routes/user.js')
| -rw-r--r-- | routes/user.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/routes/user.js b/routes/user.js index a373393..7c88ed4 100644 --- a/routes/user.js +++ b/routes/user.js @@ -160,7 +160,12 @@ router.get('/signin', loggedOut, function (req, res, next) { /** Render/GET verification page. */ router.get('/verify', function(req, res, next) { - res.render('verification', {noHeader: true, noFooter: true}); + if (req.user.email) { + res.render('verification', {noHeader: true, noFooter: true}); + } else { + res.redirect('/user/user_profile'); + } + }); /** Retrieves infomation from the signup form, form validates and sends it to passport.js to authenticate. */ |
