Make it impossible to log in with the ghost user

This commit is contained in:
Daniel Hougaard
2024-02-13 14:21:50 +01:00
parent 8e13eb6077
commit 6dcab6646c

View File

@@ -23,7 +23,7 @@ export const userDALFactory = (db: TDbClient) => {
const findUserEncKeyByEmail = async (email: string) => {
try {
return await db(TableName.Users)
.where({ email })
.where({ email, ghost: false })
.join(TableName.UserEncryptionKey, `${TableName.Users}.id`, `${TableName.UserEncryptionKey}.userId`)
.first();
} catch (error) {