Skip to content

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

fix: remove ghost users being added as seats in stripe

ShubhamPalriwala686a28cc0992
diff --git a/backend/src/ee/services/license/license-dal.ts b/backend/src/ee/services/license/license-dal.ts
index 4e70dfb5a5..cf70488019 100644
--- a/backend/src/ee/services/license/license-dal.ts
+++ b/backend/src/ee/services/license/license-dal.ts
@@ -16,6 +16,8 @@ export const licenseDALFactory = (db: TDbClient) => {
void bd.where({ orgId });
}
})
+ .join(TableName.Users, `${TableName.OrgMembership}.userId`, `${TableName.Users}.id`)
+ .where(`${TableName.Users}.isGhost`, false)
.count();
return doc?.[0].count;
} catch (error) {