public function passwordFormSucceeded(Form $form, ArrayHash $values): void
	{
		if ($values->generatePassword) {
			$password = Random::generate($this->minPasswordLength, $this->passwordChars);
		} else {
			$password = $values->password;
		}

		$this->currentUser->setPassword($password);

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

		if ($this->configurator->sendChangePassword) {
			$this->mailer->sendNewPassword($this->currentUser->email, $this->currentUser->username, $password);
		}

		$this->flashNotifier->success('cms.user.passwordChanged');
		$this->restoreBacklink();
	}
public function passwordFormSucceeded(Form $form, ArrayHash $values): void
	{
		if ($values->generatePassword) {
			$password = Random::generate($this->minPasswordLength, $this->passwordChars);
		} else {
			$password = $values->password;
		}

		$this->currentUser->setPassword($password);

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

		if ($this->configurator->sendChangePassword) {
			$this->mailer->sendNewPassword($this->currentUser->email, $this->currentUser->username, $password);
		}

		$this->flashNotifier->success('cms.user.passwordChanged');
		$this->restoreBacklink();
	}
public function passwordFormSucceeded ( Form $ form , ArrayHash $ values ) : void { if ( $ values -> generatePassword ) { $ password = Random :: generate ( $ this -> minPasswordLength , $ this -> passwordChars ) ; } else { $ password = $ values -> password ; } $ this -> currentUser -> setPassword ( $ password ) ; $ this -> orm -> persistAndFlush ( $ this -> currentUser ) ; if ( $ this -> configurator -> sendChangePassword ) { $ this -> mailer -> sendNewPassword ( $ this -> currentUser -> email , $ this -> currentUser -> username , $ password ) ; } $ this -> flashNotifier -> success ( 'cms.user.passwordChanged' ) ; $ this -> restoreBacklink ( ) ; }
Zpracovani zmeny hesla
@param Form $form
@param ArrayHash $values
@throws AuthenticationException
@throws InvalidLinkException
Zpracovani zmeny hesla