예제 #1
0
 /**
  * @param Form $form
  */
 public function mcNickSubmitted($form)
 {
     $this->userRepo->setMcNick($form->getValues()->userId, $form->getValues()->mcname);
     $this->flashMessage("Minecraft nick změněn.", "success");
     if ($this->isAjax()) {
         $this->redrawControl();
     } else {
         $this->redirect('this');
     }
 }
예제 #2
0
 public function beforeRender()
 {
     parent::beforeRender();
     $nullUsers = $this->userRepository->findBy(array('uuid' => NULL, 'NOT mcname' => NULL));
     try {
         foreach ($nullUsers as $user) {
             $identity = $this->uuidModel->getUuid($user->mcname, TRUE);
             $this->userRepository->setUUID($user->id, $identity['uuid']);
             $this->userRepository->setMcNick($user->id, $identity['name']);
         }
     } catch (RuntimeException $exc) {
         //echo nothing critical
     }
 }