Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

fix(users): Correct the condition for `verify_email` flow in decision manger (#4580)

Mani Chandra3db5b82d0de4
diff --git a/crates/router/src/types/domain/user/decision_manager.rs b/crates/router/src/types/domain/user/decision_manager.rs
index d635ac064f..5a0388c7f3 100644
--- a/crates/router/src/types/domain/user/decision_manager.rs
+++ b/crates/router/src/types/domain/user/decision_manager.rs
@@ -42,7 +42,7 @@ impl SPTFlow {
Self::TOTP => Ok(true),
// Main email APIs
Self::AcceptInvitationFromEmail | Self::ResetPassword => Ok(true),
- Self::VerifyEmail => Ok(user.0.is_verified),
+ Self::VerifyEmail => Ok(!user.0.is_verified),
// Final Checks
Self::ForceSetPassword => user.is_password_rotate_required(state),
Self::MerchantSelect => user