aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib')
-rw-r--r--server/lib/oauth-model.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/oauth-model.ts b/server/lib/oauth-model.ts
index b3cc75590..3adcce7b0 100644
--- a/server/lib/oauth-model.ts
+++ b/server/lib/oauth-model.ts
@@ -25,10 +25,10 @@ function getRefreshToken (refreshToken: string) {
25 return OAuthTokenModel.getByRefreshTokenAndPopulateClient(refreshToken) 25 return OAuthTokenModel.getByRefreshTokenAndPopulateClient(refreshToken)
26} 26}
27 27
28async function getUser (username: string, password: string) { 28async function getUser (usernameOrEmail: string, password: string) {
29 logger.debug('Getting User (username: ' + username + ', password: ******).') 29 logger.debug('Getting User (username/email: ' + usernameOrEmail + ', password: ******).')
30 30
31 const user = await UserModel.getByUsername(username) 31 const user = await UserModel.loadByUsernameOrEmail(usernameOrEmail)
32 if (!user) return null 32 if (!user) return null
33 33
34 const passwordMatch = await user.isPasswordMatch(password) 34 const passwordMatch = await user.isPasswordMatch(password)