added client and server validation on registration

This commit is contained in:
Julian Lam
2013-05-13 16:57:47 -04:00
parent 9a768a4f6c
commit 487d740164
3 changed files with 77 additions and 52 deletions

View File

@@ -138,9 +138,8 @@
}));
app.post('/register', function(req, res) {
console.log('wtf');
user_module.create(req.body.username, req.body.password, req.body.email, function(err, uid) {
if (err === null) {
if (err === null && uid > 0) {
req.login({
uid: uid
}, function() {