PHP code example of geniv / nette-identity-forgotten

1. Go to this page and download the library: Download geniv/nette-identity-forgotten library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

geniv / nette-identity-forgotten example snippets


protected function createComponentIdentityForgottenStep1(ForgottenFormStep1 $forgottenFormStep1, ForgottenEmailNotifyEvent $emailNotifyEvent): ForgottenFormStep1
{
    $forgottenFormStep1->onSuccess[] = function (array $values) {
        $this->flashMessage('Step1!', 'info');
        $this->redirect('this');
    };
    $forgottenFormStep1->onException[] = function (EventException $e) {
        $this->flashMessage('Step1 exception! ' . $e->getMessage(), 'danger');
        $this->redirect('this');
    };
    return $forgottenFormStep1;
}

protected function createComponentIdentityForgottenStep2(ForgottenFormStep2 $forgottenFormStep2): ForgottenFormStep2
{
    $forgottenFormStep2->onSuccess[] = function (array $values) {
        $this->flashMessage('Step2!', 'info');
        $this->redirect('Login:');
    };
    $forgottenFormStep2->onException[] = function (EventException $e) {
        $this->flashMessage('Step2 exception! ' . $e->getMessage(), 'danger');
        $this->redirect('this');
    };
    return $forgottenFormStep2;
}
json
"php": ">=7.0.0",
"nette/nette": ">=2.4.0",
"geniv/nette-general-form": ">=1.0.0"