Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim firstName, lastName in the register form #7810

Merged
merged 5 commits into from
May 21, 2024
Merged

Trim firstName, lastName in the register form #7810

merged 5 commits into from
May 21, 2024

Conversation

fm3
Copy link
Member

@fm3 fm3 commented May 16, 2024

My theory is that people started typing their full name in the register form’s »first name« field, and then removed their last name but not the space when they saw that there is a separate last name field. Let’s just trim the form field content and see if that helps for new users.

Steps to test:

  • set features.isWkOrgInstance=true in application.conf
  • register new account, type spaces around your firstName
  • should be trimmed in the resulting user name + organization name.

Question

  • Should we repair existing users + organization display names? My assumption would be that it doesn’t hurt, as nothing should reference users directly by name. What do you think?

Issues:


  • Removed dev-only changes like prints and application.conf edits
  • Considered common edge cases

@fm3 fm3 self-assigned this May 16, 2024
@fm3 fm3 marked this pull request as ready for review May 16, 2024 16:05
@philippotto
Copy link
Member

Thanks for doing this 🙏 I pushed a change which adds the trimming in the other (non wk) registration form, too. My other attempt to use normalize didn't work well, since the user couldn't even type a space at the end of a name field..

Should we repair existing users + organization display names? My assumption would be that it doesn’t hurt, as nothing should reference users directly by name. What do you think?

Yes, I think so, too 👍

Copy link
Member

@hotzenklotz hotzenklotz left a comment

Choose a reason for hiding this comment

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

LGTM

@fm3 fm3 merged commit 31f2d9e into master May 21, 2024
2 checks passed
@fm3 fm3 deleted the trim-name branch May 21, 2024 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Why do so many users have spaces in their names?
3 participants