Skip to content

Commit

Permalink
Don't auto-verify mobile emails anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
radazen committed May 2, 2024
1 parent a02cbf5 commit 6a86766
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions publicapi/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,17 +597,10 @@ func (api UserAPI) CreateUser(ctx context.Context, authenticator auth.Authentica
return "", "", err
}

// Temporary fix for the mobile app
if gc.GetHeader("X-Platform") == "Mobile" {
if email != nil {
createUserParams.EmailStatus = persist.EmailVerificationStatusVerified
}
} else {
if createUserParams.EmailStatus == persist.EmailVerificationStatusUnverified && email != nil {
if err := emails.RequestVerificationEmail(ctx, userID); err != nil {
// Just the log the error since the user can verify their email later
logger.For(ctx).Warnf("failed to send verification email: %s", err)
}
if createUserParams.EmailStatus == persist.EmailVerificationStatusUnverified && email != nil {
if err := emails.RequestVerificationEmail(ctx, userID); err != nil {
// Just the log the error since the user can verify their email later
logger.For(ctx).Warnf("failed to send verification email: %s", err)
}
}

Expand Down

0 comments on commit 6a86766

Please sign in to comment.