[guadec-web-regcfp/develop] Check some name is entered



commit e912ec19fb093c14dfcb501e9607811684e6a294
Author: Patrick Uiterwijk <puiterwijk redhat com>
Date:   Fri May 22 13:37:17 2015 +0200

    Check some name is entered

 routes/auth.js |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/routes/auth.js b/routes/auth.js
index d14e33f..b0208df 100644
--- a/routes/auth.js
+++ b/routes/auth.js
@@ -74,6 +74,11 @@ router.post('/register', function(req, res, next) {
     origin = '/';
   };
 
+  if(fullname == '') {
+    res.redirect(302, '/auth/register?origin=' + origin);
+    return;
+  }
+
   User.find({
     where: {
       email: req.session.currentUser


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]