aboutsummaryrefslogtreecommitdiff
path: root/routes/user.js
diff options
context:
space:
mode:
authornanalelfe <nargiza.nosirova@mail.utoronto.ca>2016-08-15 06:15:06 +0000
committernanalelfe <nargiza.nosirova@mail.utoronto.ca>2016-08-15 06:15:06 +0000
commit08c9d21dd4a4da2f5ec713ca94a884d3924761c1 (patch)
tree62d662948fc6ab687e7b52bd17fe0258d6c8c0dd /routes/user.js
parenta3efcf4365c0ef2470a5e6f1116e2142ce8e780d (diff)
Fixed message when someone logs in with facebook using an email that already exists
Diffstat (limited to 'routes/user.js')
-rw-r--r--routes/user.js12
1 files changed, 1 insertions, 11 deletions
diff --git a/routes/user.js b/routes/user.js
index 56b5321..d2eea37 100644
--- a/routes/user.js
+++ b/routes/user.js
@@ -158,16 +158,6 @@ router.get('/signin', loggedOut, function (req, res, next) {
});
});
-/** Render/GET verification page. */
-router.get('/verify', function(req, res, next) {
- if (req.user && 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. */
router.post('/signup', loggedOut, function(req, res, next) {
req.assert('fname', 'Please enter a valid first name.').notEmpty().withMessage('First name required.').isAlpha();
@@ -207,7 +197,7 @@ router.post('/signin', loggedOut, function(req, res, next) {
if (errors) {
req.session.errors = errors;
req.session.success = false;
- res.redirect('/signin');
+ res.redirect('/user/signin');
} else {
passport.authenticate('local_signin', {
successRedirect: '/user/user_profile',