示例#1
0
 /**
  * @param \Nette\Application\UI\Form $form
  * @param string $resetKey
  */
 protected function save(Form $form, $resetKey)
 {
     $user = $this->userRepository->findOneBy(array('resetKey' => $resetKey));
     $user->removeResetKey($resetKey);
     $user->setPassword($form['password']->getValue());
     $this->entityManager->flush();
     $this->securityManager->sendNewPassword($user);
 }
示例#2
0
 public function confirmFormSuccess()
 {
     $this->securityManager->sendNewPassword($this->resetUser);
     $this->flashMessage($this->translator->translate('New password has been saved.'), 'success');
     $this->redirect('this', array('key' => null));
 }