This commit is contained in:
Baris Soner Usakli
2013-12-23 12:22:50 -05:00
parent 8fd78199e2
commit f68f02d346
5 changed files with 16 additions and 1 deletions

View File

@@ -193,6 +193,10 @@
});
app.post('/register', function(req, res) {
if(parseInt(meta.config.allowRegistration, 10) === 0) {
return res.send(403);
}
user.create(req.body.username, req.body.password, req.body.email, function(err, uid) {
if (err === null && uid) {
req.login({