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

Case insensitive username #341

Merged
merged 1 commit into from
Jul 25, 2015
Merged

Case insensitive username #341

merged 1 commit into from
Jul 25, 2015

Conversation

inderpreetsingh
Copy link
Contributor

I was looking into open source slack alternatives for a little startup and came across rocket.chat. I deployed it locally and when I tried to signup with username IshwerDAS (that's how we would like to spell it as DAS is actually an acronym). Anyway, it gave me an error. It took me a while to figure out what was wrong as all that error said was use only letters, numbers, dots and dashes and that was all I was using. A little look into code made me realize that regex used was only for lower case letters. So now either the error given should have been better or it should accept mixed case usernames. I preferred later and edited code to accept mixed case usernames. But I also didn't want 2 people signing up with same username in different case, so changed the function usernameIsAvaliable to be case insensitive when searching.

Other solutions could be

  • Change the error message for better
  • Convert whatever user types in username box to lowercase before submitting.

@inderpreetsingh
Copy link
Contributor Author

Please also respond to issue #342

@marceloschmidt
Copy link
Member

@rodrigok I think it's ok to merge, so I'm doing it... if you think of any reason why we won't allow uppercase chars, we can revert that. Let us know.

marceloschmidt added a commit that referenced this pull request Jul 25, 2015
@marceloschmidt marceloschmidt merged commit dcfcda1 into RocketChat:master Jul 25, 2015
@rodrigok
Copy link
Member

I see no problems with this solution since the user unique verification was changed to be no case sensitive too.

HappyTobi pushed a commit to HappyTobi/Rocket.Chat that referenced this pull request Jul 10, 2018
shubhsherl pushed a commit to shubhsherl/Rocket.Chat that referenced this pull request Sep 10, 2020
…on_subscription_handle

Push notification subscription handle
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.

3 participants