Пример #1
0
 /**
  * @param array $data
  * @param UserInterface $user
  * @return bool
  */
 public function changeInGamePwd(array $data, UserInterface $user)
 {
     $user = $this->userService->getUser4Id($user->getId());
     if (!$this->isPwdChangeAllowed($data, $user, 'InGame')) {
         return false;
     }
     // check if we have to change it at web too
     if ($this->isSamePasswordOption()) {
         $user = $this->userService->setNewPasswordAtUser($user, $data['password']);
     }
     $this->gameBackendService->setUser($user, $data['password']);
     return $user;
 }
Пример #2
0
 /**
  * @param $userId
  * @return bool
  */
 public function userExists($userId)
 {
     $user = $this->userService->getUser4Id($userId);
     return (bool) $user;
 }