public function restorePasswordFormSucceeded(Form $form, ArrayHash $values): void
	{
		$session = $this->getSession('cms/restorePassword');
		$email = $session->{$values->hash};
		$session->remove();

		$user = $this->orm->users->getByEmail($email);
		if ($user) {
			$user->setPassword($values->password);
			$this->orm->persistAndFlush($user);
			$this->flashNotifier->success('cms.user.passwordChanged');
		} else {
			$this->flashNotifier->error('cms.permissions.accessDenied');
		}
		$this->redirect(":{$this->module}:Sign:in");
	}
public function restorePasswordFormSucceeded(Form $form, ArrayHash $values): void
	{
		$session = $this->getSession('cms/restorePassword');
		$email = $session->{$values->hash};
		$session->remove();

		$user = $this->orm->users->getByEmail($email);
		if ($user) {
			$user->setPassword($values->password);
			$this->orm->persistAndFlush($user);
			$this->flashNotifier->success('cms.user.passwordChanged');
		} else {
			$this->flashNotifier->error('cms.permissions.accessDenied');
		}
		$this->redirect(":{$this->module}:Sign:in");
	}
public function restorePasswordFormSucceeded ( Form $ form , ArrayHash $ values ) : void { $ session = $ this -> getSession ( 'cms/restorePassword' ) ; $ email = $ session -> { $ values -> hash } ; $ session -> remove ( ) ; $ user = $ this -> orm -> users -> getByEmail ( $ email ) ; if ( $ user ) { $ user -> setPassword ( $ values -> password ) ; $ this -> orm -> persistAndFlush ( $ user ) ; $ this -> flashNotifier -> success ( 'cms.user.passwordChanged' ) ; } else { $ this -> flashNotifier -> error ( 'cms.permissions.accessDenied' ) ; } $ this -> redirect ( ":{$this->module}:Sign:in" ) ; }
Zpracovani formulare pro obnoveni hesla
@param Form $form
@param ArrayHash $values
@throws AuthenticationException
@throws AbortException
Zpracovani formulare pro obnoveni hesla