Skip to content

Removed LOWER() from email check#14

Open
mikoczy wants to merge 1 commit into
remp2020:masterfrom
mikoczy:removed_email_lower
Open

Removed LOWER() from email check#14
mikoczy wants to merge 1 commit into
remp2020:masterfrom
mikoczy:removed_email_lower

Conversation

@mikoczy

@mikoczy mikoczy commented Mar 29, 2021

Copy link
Copy Markdown
Contributor

No description provided.

@markoph

markoph commented Mar 29, 2021

Copy link
Copy Markdown
Member

@mikoczy please add description to your PR. Why do you need to remove this validation check?

This transformation to lower case was added so we don't register two users with same email address - eg. john@gmail.com and JOHN@gmail.com. Gmail (and most of the email providers) is not case sensitive so these emails are actually same account.

If you have valid use case we can move this validation to some kind of validation provider which could be disabled. But we don't want to remove it.

@mikoczy

mikoczy commented Mar 29, 2021

Copy link
Copy Markdown
Contributor Author

@markoph sorry, it is a follow up to an older pr (#6).. mysql is case insensitive too, so the use case you described, cannot happen... on the other hand, when using LOWER, mysql will not use the email index, so if the users table is big enough, this query can be very slow, timeouts can happen, when adding a user through api..

@markoph

markoph commented Apr 8, 2021

Copy link
Copy Markdown
Member

@mikoczy FYI: your commit was merged internally and changes will be part of next release.

@mikoczy

mikoczy commented Apr 8, 2021

Copy link
Copy Markdown
Contributor Author

@markoph great, thanks

rootpd pushed a commit that referenced this pull request Apr 12, 2021
MySQL is case insensitive. And when LOWER is used, MySQL will not use
the email index.

#14
@rootpd rootpd force-pushed the master branch 2 times, most recently from 1bb0b05 to 8e046aa Compare July 29, 2022 13:16
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