original_string: public function doAuthentication(UserInterface $user)
      {
          /** @var \PServerCore\Entity\Repository\User $repository */
          $repository = $this->entityManager->getRepository($this->getUserEntityClassName());
  
          // fix if we have a proxy we don´t have a valid entity, so we have to clear before we can create a new select
          $username = $user->getUsername();
          $repository->clear();
  
          $userNew = $repository->getUser4UserName($username);
  
          $authService = $this->getAuthService();
  
          $authService->getStorage()->write($userNew);
      }
code: public function doAuthentication(UserInterface $user)
      {
          /** @var \PServerCore\Entity\Repository\User $repository */
          $repository = $this->entityManager->getRepository($this->getUserEntityClassName());
  
          // fix if we have a proxy we don´t have a valid entity, so we have to clear before we can create a new select
          $username = $user->getUsername();
          $repository->clear();
  
          $userNew = $repository->getUser4UserName($username);
  
          $authService = $this->getAuthService();
  
          $authService->getStorage()->write($userNew);
      }
code_tokens: public function doAuthentication ( UserInterface $ user ) { /** @var \PServerCore\Entity\Repository\User $repository */ $ repository = $ this -> entityManager -> getRepository ( $ this -> getUserEntityClassName ( ) ) ; // fix if we have a proxy we don´t have a valid entity, so we have to clear before we can create a new select $ username = $ user -> getUsername ( ) ; $ repository -> clear ( ) ; $ userNew = $ repository -> getUser4UserName ( $ username ) ; $ authService = $ this -> getAuthService ( ) ; $ authService -> getStorage ( ) -> write ( $ userNew ) ; }
docstring: Login with a User
  
  @param UserInterface $user
docstring_tokens: Login with a User