Skip to content

Commit

Permalink
Undefined variable $userName in example
Browse files Browse the repository at this point in the history
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()`.
  • Loading branch information
Trekels authored and javiereguiluz committed Jul 23, 2018
1 parent 24816e5 commit e6d500f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions security/custom_provider.rst
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ Here's an example of how this might look::
);
}

$username = $user->getUsername();

return $this->fetchUser($username);
}

Expand Down

0 comments on commit e6d500f

Please sign in to comment.