Skip to content

Conversation

heiytor
Copy link
Contributor

@heiytor heiytor commented Mar 8, 2025

No description provided.

@heiytor heiytor self-assigned this Mar 8, 2025
@heiytor heiytor requested review from a team as code owners March 8, 2025 18:54
@heiytor heiytor marked this pull request as draft March 8, 2025 18:55
@heiytor heiytor force-pushed the feat/postgres branch 2 times, most recently from b298f40 to fb0dd93 Compare March 25, 2025 21:04
Comment on lines 44 to 57
if req.Name != "" {
user.Name = cases.Title(language.AmericanEnglish).String(strings.ToLower(req.Name))
}

if req.Username != "" {
user.Username = strings.ToLower(req.Username)
}

if req.Email != "" {
user.Email = strings.ToLower(req.Email)
}

if req.RecoveryEmail != "" {
user.Preferences.SecurityEmail = strings.ToLower(req.RecoveryEmail)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here we can use the previous strategy, which is always to the lowercase function call. The checking seems to be not worth and it complicates the code without a real, probably, good performance gain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants