/**
  * @param string $value
  *
  * @return bool
  */
 protected function query($value)
 {
     $class = $this->entityOptions->getUser();
     /** @var \PServerCore\Entity\UserInterface $user */
     $user = new $class();
     $user->setUsername($value);
     return $this->gameBackendService->isUserNameExists($user);
 }
Esempio n. 2
0
 /**
  * @param $userId
  *
  * @return null|\PServerCore\Entity\UserInterface
  */
 protected function getUser4Id($userId)
 {
     /** @var \PServerCore\Entity\Repository\User $userRepository */
     $userRepository = $this->entityManager->getRepository($this->entityOptions->getUser());
     return $userRepository->getUser4Id($userId);
 }