From 0ebca23587d07baadda2789378db3912ca9f30c3 Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Sat, 28 Apr 2018 15:22:22 +0200 Subject: [PATCH] Allow login using e-mail address --- lib/repository/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {