diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c438b37e..6b2376ce2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changes - Updates `createOrUpdateThirdPartyConfig` and `getThirdPartyConfig` dashboard APIs to handle boxy SAML inputs. +- Fixes an issue where `isEmailChangeAllowed` was not checking across all tenants ### Breaking changes diff --git a/lib/build/recipe/accountlinking/recipe.js b/lib/build/recipe/accountlinking/recipe.js index 656686bc6..0e29dd06f 100644 --- a/lib/build/recipe/accountlinking/recipe.js +++ b/lib/build/recipe/accountlinking/recipe.js @@ -390,7 +390,7 @@ class Recipe extends recipeModule_1.default { } for (const tenantId of inputUser.tenantIds) { let existingUsersWithNewEmail = await this.recipeInterfaceImpl.listUsersByAccountInfo({ - tenantId: inputUser.tenantIds[0], + tenantId, accountInfo: { email: input.newEmail, }, diff --git a/lib/ts/recipe/accountlinking/recipe.ts b/lib/ts/recipe/accountlinking/recipe.ts index 40aba849f..d7f5a33ce 100644 --- a/lib/ts/recipe/accountlinking/recipe.ts +++ b/lib/ts/recipe/accountlinking/recipe.ts @@ -552,7 +552,7 @@ export default class Recipe extends RecipeModule { for (const tenantId of inputUser.tenantIds) { let existingUsersWithNewEmail = await this.recipeInterfaceImpl.listUsersByAccountInfo({ - tenantId: inputUser.tenantIds[0], + tenantId, accountInfo: { email: input.newEmail, },