Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Add isEmailVerified to findUserByEmail

carlosmonastyrski5d35ce6c6c28
diff --git a/backend/src/services/user/user-dal.ts b/backend/src/services/user/user-dal.ts
index add1b4532c..0f623dff1c 100644
--- a/backend/src/services/user/user-dal.ts
+++ b/backend/src/services/user/user-dal.ts
@@ -22,7 +22,9 @@ export const userDALFactory = (db: TDbClient) => {
(tx || db)(TableName.Users).whereRaw('lower("username") = :username', { username: username.toLowerCase() });
const findUserByEmail = async (email: string, tx?: Knex) =>
- (tx || db)(TableName.Users).whereRaw('lower("email") = :email', { email: email.toLowerCase() });
+ (tx || db)(TableName.Users).whereRaw('lower("email") = :email', { email: email.toLowerCase() }).where({
+ isEmailVerified: true
+ });
const getUsersByFilter = async ({
limit,