-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Refactored the update of the hashed password and canonical fields #1615
Conversation
3bc6d57
to
d4aca57
Compare
👍 |
1 similar comment
👍 |
{ | ||
$plainPassword = $user->getPlainPassword(); | ||
|
||
if (0 === strlen($plainPassword)) { |
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.
CS and this can be optimized to if ('' === $plainPassword) {
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.
no, because this would not handle null
anymore
d2b1d51
to
bbcc4b7
Compare
The responsibility of updating these fields is moved to dedicated services instead of being in the UserManager, allowing to inject them in the Doctrine listener and the validator initializer without any issue about circular dependencies.
👍 |
@XWB FYI, I have further improvements in my mind following this:
These will come in separate PRs. |
Yes we should make the salt optional before 2.0 goes final. |
The responsibility of updating these fields is moved to dedicated services instead of being in the UserManager, allowing to inject them in the Doctrine listener and the validator initializer without any issue about circular dependencies.
This PR currently includes #1612 as they would conflict together otherwise. I will need to be rebased once the other PR is merged.This is a BC break for people extending the user manager (or instantiating the existing one themselves, but this would be weird) as the constructor signature has changed.