diff options
-rw-r--r-- | Core/User/ChainUserProvider.php | 4 | ||||
-rw-r--r-- | Core/User/EntityUserProvider.php | 2 | ||||
-rw-r--r-- | Core/User/InMemoryUserProvider.php | 2 | ||||
-rw-r--r-- | Core/User/UserProviderInterface.php | 4 | ||||
-rw-r--r-- | Http/Firewall/ContextListener.php | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/Core/User/ChainUserProvider.php b/Core/User/ChainUserProvider.php index d2b6e8c..e6aca32 100644 --- a/Core/User/ChainUserProvider.php +++ b/Core/User/ChainUserProvider.php @@ -50,11 +50,11 @@ class ChainUserProvider implements UserProviderInterface /** * {@inheritDoc} */ - public function loadUser(UserInterface $user) + public function refreshUser(UserInterface $user) { foreach ($this->providers as $provider) { try { - return $provider->loadUser($user); + return $provider->refreshUser($user); } catch (UnsupportedUserException $unsupported) { // try next one } diff --git a/Core/User/EntityUserProvider.php b/Core/User/EntityUserProvider.php index 61dd708..cc6f6ed 100644 --- a/Core/User/EntityUserProvider.php +++ b/Core/User/EntityUserProvider.php @@ -66,7 +66,7 @@ class EntityUserProvider implements UserProviderInterface /** * {@inheritDoc} */ - public function loadUser(UserInterface $user) + public function refreshUser(UserInterface $user) { if (!$user instanceof $this->class) { throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_class($user))); diff --git a/Core/User/InMemoryUserProvider.php b/Core/User/InMemoryUserProvider.php index e73eb95..eae2083 100644 --- a/Core/User/InMemoryUserProvider.php +++ b/Core/User/InMemoryUserProvider.php @@ -78,7 +78,7 @@ class InMemoryUserProvider implements UserProviderInterface /** * {@inheritDoc} */ - public function loadUser(UserInterface $user) + public function refreshUser(UserInterface $user) { if (!$user instanceof User) { throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_class($user))); diff --git a/Core/User/UserProviderInterface.php b/Core/User/UserProviderInterface.php index fb5c106..11fd62c 100644 --- a/Core/User/UserProviderInterface.php +++ b/Core/User/UserProviderInterface.php @@ -33,7 +33,7 @@ interface UserProviderInterface function loadUserByUsername($username); /** - * Loads the user for the account interface. + * Refreshes the user for the account interface. * * It is up to the implementation if it decides to reload the user data * from the database, or if it simply merges the passed User into the @@ -44,7 +44,7 @@ interface UserProviderInterface * * @return UserInterface */ - function loadUser(UserInterface $user); + function refreshUser(UserInterface $user); /** * Whether this provider supports the given user class diff --git a/Http/Firewall/ContextListener.php b/Http/Firewall/ContextListener.php index 950429a..4936266 100644 --- a/Http/Firewall/ContextListener.php +++ b/Http/Firewall/ContextListener.php @@ -128,7 +128,7 @@ class ContextListener implements ListenerInterface foreach ($this->userProviders as $provider) { try { - $token->setUser($provider->loadUser($user)); + $token->setUser($provider->refreshUser($user)); if (null !== $this->logger) { $this->logger->debug(sprintf('Username "%s" was reloaded from user provider.', $user->getUsername())); |