public function registerAdministratorFormSucceeded(Form $form, ArrayHash $values): void
	{
		$password = $values->password;

		$role = $this->orm->aclRoles->getByName(AclRolesMapper::SUPERADMIN);

		$user = new User;
		$user->firstName = $values->firstName;
		$user->surname = $values->surname;
		$user->email = $values->email;
		$user->username = $values->username;
		$user->setPassword($password);
		$user->roles->add($role);

		$this->orm->persistAndFlush($user);

		$this->user->setExpiration('+ ' . $this->loginExpiration, true);
		$this->user->login($values->username, $password);

		$this->flashNotifier->success('cms.user.dataSaved');

		$this->redirect(":{$this->module}:Homepage:");
	}
public function registerAdministratorFormSucceeded(Form $form, ArrayHash $values): void
	{
		$password = $values->password;

		$role = $this->orm->aclRoles->getByName(AclRolesMapper::SUPERADMIN);

		$user = new User;
		$user->firstName = $values->firstName;
		$user->surname = $values->surname;
		$user->email = $values->email;
		$user->username = $values->username;
		$user->setPassword($password);
		$user->roles->add($role);

		$this->orm->persistAndFlush($user);

		$this->user->setExpiration('+ ' . $this->loginExpiration, true);
		$this->user->login($values->username, $password);

		$this->flashNotifier->success('cms.user.dataSaved');

		$this->redirect(":{$this->module}:Homepage:");
	}
public function registerAdministratorFormSucceeded ( Form $ form , ArrayHash $ values ) : void { $ password = $ values -> password ; $ role = $ this -> orm -> aclRoles -> getByName ( AclRolesMapper :: SUPERADMIN ) ; $ user = new User ; $ user -> firstName = $ values -> firstName ; $ user -> surname = $ values -> surname ; $ user -> email = $ values -> email ; $ user -> username = $ values -> username ; $ user -> setPassword ( $ password ) ; $ user -> roles -> add ( $ role ) ; $ this -> orm -> persistAndFlush ( $ user ) ; $ this -> user -> setExpiration ( '+ ' . $ this -> loginExpiration , true ) ; $ this -> user -> login ( $ values -> username , $ password ) ; $ this -> flashNotifier -> success ( 'cms.user.dataSaved' ) ; $ this -> redirect ( ":{$this->module}:Homepage:" ) ; }
Zpracovani formulare pro prvniho uzivatele
@param Form $form
@param ArrayHash $values
@throws AuthenticationException
@throws AbortException
Zpracovani formulare pro prvniho uzivatele