public function formSucceeded(Form $form) { try { $p = $this->getPresenter(); $values = $form->getValues(); $user = $this->userRepository->updateProfileSettings($values, $this->item); $this->userStorage->setIdentity($this->authenticator->updateIdentity($user)); $p->flashMessage($this->translator->translate('locale.settings.changed_successfully'), FlashType::SUCCESS); } catch (PossibleUniqueKeyDuplicationException $e) { $this->addFormError($form, $e); } catch (\Exception $e) { $this->addFormError($form, $e, $this->translator->translate('locale.error.occurred')); } $p->redirect('this'); }
/** * @param string */ public function setPassword($password) { $this->password = Authenticator::hashPassword($password); }