feature #10792 [Security] Allow overloading ContextListener::refreshUser() (lstrojny)

This PR was merged into the 2.6-dev branch.

Discussion
----------

[Security] Allow overloading ContextListener::refreshUser()

Allow overloading refreshUser() for the use case of doing something special with user providers.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n.A.
| License       | MIT
| Doc PR        | n.A.

Commits
-------

b67ed43 Allow overloading ContextListener::refreshUser()
This commit is contained in:
Fabien Potencier 2014-06-03 22:56:38 +02:00
commit be6aac252e

View File

@ -142,7 +142,7 @@ class ContextListener implements ListenerInterface
*
* @throws \RuntimeException
*/
private function refreshUser(TokenInterface $token)
protected function refreshUser(TokenInterface $token)
{
$user = $token->getUser();
if (!$user instanceof UserInterface) {