-
-
Couldn't load subscription status.
- Fork 4.6k
fix: force lowercase emails #53887
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
fix: force lowercase emails #53887
Conversation
2e013c3 to
de53ca4
Compare
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
de53ca4 to
027471b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically wrong, accepted in reality 🤷♀️
| */ | ||
| public function setSystemEMailAddress(string $mailAddress): void { | ||
| $oldMailAddress = $this->getSystemEMailAddress(); | ||
| $mailAddress = mb_strtolower(trim($mailAddress)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is enough, you do not need to add calls to mb_strtolower prior to calling this method, no?
Feels like you added the conversion both outside and inside of the setter. Inside is enough IMO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's because the email/value is sometimes also used at later stages of the parent methods.
So the setter is nice, but not enough
|
/backport to stable31 |
|
/backport to stable30 |
|
The psalm baseline was not adjusted: PR will follow in a few seconds. |
Weird, it didn't complain on CI and I did run a baseline update (you can see it in the changed files) |
|
I'm not sure either, it's a bit weird. I think it might just be psalm doing weird things again. |
|
Does this fix #53367 if I have existing users with capitalized mail addresses? |
I think it should, we'll be happy to have some feedback if you can try the RC1 releases of yesterday :) |
Summary
Not 100% sure this is the best in terms of code quality, but seems the most straightforward 🤷
Checklist