-
Notifications
You must be signed in to change notification settings - Fork 144
fix: workaround for email only registration/login #232
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
Conversation
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.
Comment is optional, workaround looks good.
@kenjis It seems that changes to file shield/src/Authentication/Passwords/NothingPersonalValidator.php Lines 15 to 20 in 00023ee
|
@datamweb What do you mean? By the way, the file has functions staring with
|
@datamweb Oh, thanks! I'm using PHP 8.0, so I did not notice. |
ErrorException: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated
065b99e
to
b41b4b7
Compare
@datamweb Fixed the error. Is this okay? |
@kenjis is okay. shield/src/Collectors/Auth.php Line 74 in 00023ee
create? |
Thanks @kenjis. |
$userName = \strtolower($user->username); | ||
$email = \strtolower($user->email); | ||
$userName = strtolower($user->username ?? ''); | ||
$email = strtolower($user->email); |
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.
Should we anticipate users trying to work without emails?
$email = strtolower($user->email); | |
$email = strtolower($user->email ?? ''); |
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.
It is out of scope of this PR.
The current implementation requires email. If we support users without email, I guess more to work.
Fixes #224