Skip to content

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

feat: switched to left join for user membership

=1bd230ee702c
diff --git a/backend/src/services/user/user-dal.ts b/backend/src/services/user/user-dal.ts
index 6de06d6fa4..228756898e 100644
--- a/backend/src/services/user/user-dal.ts
+++ b/backend/src/services/user/user-dal.ts
@@ -91,7 +91,7 @@ export const userDALFactory = (db: TDbClient) => {
isGhost: false
})
.whereIn(`${TableName.Users}.id`, userIds)
- .join(TableName.UserEncryptionKey, `${TableName.Users}.id`, `${TableName.UserEncryptionKey}.userId`);
+ .leftJoin(TableName.UserEncryptionKey, `${TableName.Users}.id`, `${TableName.UserEncryptionKey}.userId`);
} catch (error) {
throw new DatabaseError({ error, name: "Find user enc by user ids batch" });
}