password should be passed to action hook, and it was being ovewritten

This commit is contained in:
Aziz Khoury
2014-01-20 16:29:46 -05:00
parent 4fad334e18
commit 74f23497dc
2 changed files with 6 additions and 3 deletions

View File

@@ -34,8 +34,10 @@ var user = require('./user'),
message: "user-banned"
});
}
console.log(password);
console.log(JSON.stringify(userData));
bcrypt.compare(password, userData.password, function(err, res) {
bcrypt.compare(password, userData.password || '', function(err, res) {
if (err) {
winston.err(err.message);
next(new Error('bcrypt compare error'));