From 48da5b0e58467ca1331a0ef5e2d32963e2e8da24 Mon Sep 17 00:00:00 2001 From: Dennis Eriksen Date: Wed, 15 May 2013 11:33:37 +0200 Subject: authCallback now checks for user email --- controllers/users.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/controllers/users.js b/controllers/users.js index f3568a4..477a85a 100644 --- a/controllers/users.js +++ b/controllers/users.js @@ -83,6 +83,9 @@ exports.create = function(req, res) { */ exports.authCallback = function(req, res, next) { + // if the user hasn't registered an email, we need to do so + if (!req.user.email || req.user.email === 'undefined') return res.redirect('/registerEmail'); + res.redirect('/dashboard'); } -- cgit v1.2.3