8000 [Security] [Custom Provider] Use properties on WebserviceUser by eduardosoliv · Pull Request #4052 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Security] [Custom Provider] Use properties on WebserviceUser #4052

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

Closed
wants to merge 2 commits into from
Closed

[Security] [Custom Provider] Use properties on WebserviceUser #4052

wants to merge 2 commits into from

Conversation

eduardosoliv
Copy link

No description provided.

@mtrojanowski
Copy link
Contributor

I'm afraid I might be missing the point of this change. Is there a reason why we should use getters instead of accessing the properties?

@eduardosoliv
Copy link
Author

consistency, the salt is with the getters others not, use properties or getters but keep it consistent

        if (!$user instanceof WebserviceUser) {
            return false;
        }

        if ($this->password !== $user->getPassword()) {
            return false;
        }

        if ($this->getSalt() !== $user->getSalt()) {
            return false;
        }

        if ($this->username !== $user->getUsername()) {
            return false;
        }

@wouterj
Copy link
Member
wouterj commented Jul 24, 2014

I'd prefer to use properties then, to make it easier for users to see the difference between $this-> and $user-> in the conditions.

But great catch! We love consistency in the docs :)

@mtrojanowski
Copy link
Contributor

👍

@eduardosoliv eduardosoliv changed the title [Security] [Custom Provider] Use getters on WebserviceUser [Security] [Custom Provider] Use properties on WebserviceUser Jul 24, 2014
@eduardosoliv
Copy link
Author

Done

@wouterj
Copy link
Member
wouterj commented Jul 24, 2014

👍

@weaverryan
Copy link
Member

Cool, works for me! Thanks @entering!

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.

4 participants
0