Exemplo n.º 1
0
 public function formSucceeded(Form $form, $values)
 {
     if ($values->remember) {
         $this->user->setExpiration('14 days', FALSE);
     } else {
         $this->user->setExpiration('20 minutes', TRUE);
     }
     try {
         $this->rating->setOldSessId();
         $this->user->login($values->nick, $values->password);
         $this->rating->synchronizeUnlogged($this->user->getId());
     } catch (Nette\Security\AuthenticationException $e) {
         $form->addError($e->getMessage());
     }
 }
Exemplo n.º 2
0
 public function handleDel()
 {
     if ($this->ratingManager->removeVote()) {
         $this->redrawAjax('Hodnocení smazáno');
     }
 }