From 9d8ef212ff46cc1b96dc407a85e7486f185c5179 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 9 Feb 2022 17:48:15 +0100 Subject: Fix broken dep --- server/lib/auth/oauth-model.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/lib/auth') 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' import { UserRole } from '@shared/models/users/user-role' import { logger } from '../../helpers/logger' import { CONFIG } from '../../initializers/config' -import { UserModel } from '../../models/user/user' import { OAuthClientModel } from '../../models/oauth/oauth-client' import { OAuthTokenModel } from '../../models/oauth/oauth-token' +import { UserModel } from '../../models/user/user' import { createUserAccountAndChannelAndPlaylist } from '../user' import { TokensCache } from './tokens-cache' @@ -116,6 +116,7 @@ async function getUser (usernameOrEmail?: string, password?: string, bypassLogin logger.debug('Getting User (username/email: ' + usernameOrEmail + ', password: ******).') const user = await UserModel.loadByUsernameOrEmail(usernameOrEmail) + // If we don't find the user, or if the user belongs to a plugin if (!user || user.pluginAuth !== null || !password) return null -- cgit v1.2.3