Skip to content

Undefined variable $userName in example #10110

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 1 commit into from
Closed

Undefined variable $userName in example #10110

wants to merge 1 commit into from

Conversation

Trekels
Copy link
Contributor

@Trekels Trekels commented Jul 22, 2018

The $username variable in the WebServiceUserProvider example is not set, since the user object must implement the UserInterface (according to best practice) we can set the variable by calling $user->getUsername().

The $username variable in the `WebServiceUserProvider` example is not set, since the user object must implement the `UserInterface` (according to best practice) we can set the variable by calling `$user->getUsername()`.
@javiereguiluz
Copy link
Member

@Trekels very nice catch! Thanks for fixing this bug ... and congrats on your first Symfony Docs contribution!

javiereguiluz added a commit that referenced this pull request Jul 23, 2018
This PR was submitted for the 4.1 branch but it was merged into the 2.8 branch instead (closes #10110).

Discussion
----------

Undefined variable $userName in example

The $username variable in the `WebServiceUserProvider` example is not set, since the user object must implement the `UserInterface` (according to best practice) we can set the variable by calling `$user->getUsername()`.

Commits
-------

e6d500f Undefined variable $userName in example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants