diff --git a/lib/repository/user.js b/lib/repository/user.js index b5931b6..8f1ee82 100644 --- a/lib/repository/user.js +++ b/lib/repository/user.js @@ -82,7 +82,7 @@ class UserRepository return new Promise((resolve, reject) => { - self.store.findOne({ username: username, active: true }, (err, doc) => + self.store.findOne({ $or: [{ username: username }, { email: username }], active: true }, (err, doc) => { if (err) {