diff options
Diffstat (limited to 'server/lib/auth/oauth-model.ts')
-rw-r--r-- | server/lib/auth/oauth-model.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/lib/auth/oauth-model.ts b/server/lib/auth/oauth-model.ts index 81b6529d8..5d68f44e9 100644 --- a/server/lib/auth/oauth-model.ts +++ b/server/lib/auth/oauth-model.ts | |||
@@ -9,9 +9,9 @@ import { UserAdminFlag } from '@shared/models/users/user-flag.model' | |||
9 | import { UserRole } from '@shared/models/users/user-role' | 9 | import { UserRole } from '@shared/models/users/user-role' |
10 | import { logger } from '../../helpers/logger' | 10 | import { logger } from '../../helpers/logger' |
11 | import { CONFIG } from '../../initializers/config' | 11 | import { CONFIG } from '../../initializers/config' |
12 | import { UserModel } from '../../models/user/user' | ||
13 | import { OAuthClientModel } from '../../models/oauth/oauth-client' | 12 | import { OAuthClientModel } from '../../models/oauth/oauth-client' |
14 | import { OAuthTokenModel } from '../../models/oauth/oauth-token' | 13 | import { OAuthTokenModel } from '../../models/oauth/oauth-token' |
14 | import { UserModel } from '../../models/user/user' | ||
15 | import { createUserAccountAndChannelAndPlaylist } from '../user' | 15 | import { createUserAccountAndChannelAndPlaylist } from '../user' |
16 | import { TokensCache } from './tokens-cache' | 16 | import { TokensCache } from './tokens-cache' |
17 | 17 | ||
@@ -116,6 +116,7 @@ async function getUser (usernameOrEmail?: string, password?: string, bypassLogin | |||
116 | logger.debug('Getting User (username/email: ' + usernameOrEmail + ', password: ******).') | 116 | logger.debug('Getting User (username/email: ' + usernameOrEmail + ', password: ******).') |
117 | 117 | ||
118 | const user = await UserModel.loadByUsernameOrEmail(usernameOrEmail) | 118 | const user = await UserModel.loadByUsernameOrEmail(usernameOrEmail) |
119 | |||
119 | // If we don't find the user, or if the user belongs to a plugin | 120 | // If we don't find the user, or if the user belongs to a plugin |
120 | if (!user || user.pluginAuth !== null || !password) return null | 121 | if (!user || user.pluginAuth !== null || !password) return null |
121 | 122 | ||