From 423c787ccbb021510a73457c5a7e70d8639285b5 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Wed, 25 Dec 2013 22:30:24 -0500 Subject: [PATCH] Fix registration --- lib/web/auth.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/lib/web/auth.js b/lib/web/auth.js index b2fc7e1b..537b2d8f 100644 --- a/lib/web/auth.js +++ b/lib/web/auth.js @@ -30,8 +30,8 @@ function handleLogin(req, res) { db.users.verifyLogin(name, password, function (err, user) { if (err) { if (err === 'Invalid username/password combination') { - Logger.eventlog('Login failed (bad password): ' + name - + '@' + webserver.ipForRequest(req)); + Logger.syslog.log('Login failed (bad password): ' + name + + '@' + webserver.ipForRequest(req)); } sendJade(res, 'login', { loggedIn: false, @@ -141,19 +141,14 @@ function handleRegister(req, res) { return; } - db.users.register({ - name: name, - password: password, - email: email, - ip: ip - }, function (err) { + db.users.register(name, password, email, ip, function (err) { if (err) { sendJade(res, 'register', { registerError: err }); } else { - Logger.eventlog(ip + ' registered account: ' + name + - (email.length > 0 ? ' <' + email + '>' : '')); + Logger.syslog.log(ip + ' registered account: ' + name + + (email.length > 0 ? ' <' + email + '>' : '')); sendJade(res, 'register', { registered: true, registerName: name,