Skip to content

Commit

Permalink
feat(invite_multiple): Set status of user as InvitationSent if `ema…
Browse files Browse the repository at this point in the history
…il` feature flag is enabled (#3757)
  • Loading branch information
ThisIsMani authored Feb 21, 2024
1 parent ada6a32 commit ef5e886
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/router/src/core/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,13 @@ async fn handle_existing_user_invitation(
merchant_id: user_from_token.merchant_id.clone(),
role_id: request.role_id.clone(),
org_id: user_from_token.org_id.clone(),
status: UserStatus::Active,
status: {
if cfg!(feature = "email") {
UserStatus::InvitationSent
} else {
UserStatus::Active
}
},
created_by: user_from_token.user_id.clone(),
last_modified_by: user_from_token.user_id.clone(),
created_at: now,
Expand Down

0 comments on commit ef5e886

Please sign in to comment.