/** * {@inheritdoc} */ public function refreshUser(UserInterface $user) { $refreshedUser = $this->ownerManager->findDeveloperBy(array('id' => $user->getId())); if (null === $refreshedUser) { throw new UsernameNotFoundException(sprintf('User with ID "%d" could not be reloaded.', $user->getId())); } return $refreshedUser; }