Use userdb.getByUsername() instead of get()

This commit is contained in:
Johannes Zellner
2016-04-01 21:43:15 +02:00
parent 951934f275
commit 0b1dcd2940
2 changed files with 2 additions and 2 deletions

View File

@@ -172,7 +172,7 @@ function verify(username, password, callback) {
assert.strictEqual(typeof password, 'string');
assert.strictEqual(typeof callback, 'function');
userdb.get(username, function (error, user) {
userdb.getByUsername(username, function (error, user) {
if (error && error.reason == DatabaseError.NOT_FOUND) return callback(new UserError(UserError.NOT_FOUND));
if (error) return callback(new UserError(UserError.INTERNAL_ERROR, error));