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'); }
function setIdentity(IIdentity $identity = NULL) { $this->innerUserStorage->setIdentity($identity); }
/** * @param IIdentity $identity */ public function login(IIdentity $identity) { $this->storage->setIdentity($identity); $this->storage->setAuthenticated(true); }