public function index()
    {
        $this->defaultData();
        $formContainer = new tao_actions_form_PasswordRecovery();
        $form = $formContainer->getForm();

        if ($form->isSubmited() && $form->isValid()) {
            $mail = $form->getValue('userMail');
            $user = $this->getPasswordRecovery()->getUser(GenerisRdf::PROPERTY_USER_MAIL, $mail);

            if ($user !== null) {
                $this->logInfo("User requests a password (user URI: {$user->getUri()})");
                $this->sendMessage($user);
            } else {
                $this->logInfo("Unsuccessful recovery password. Entered e-mail address: {$mail}.");
                $this->setData('header', __('An email has been sent'));
                $this->setData('info', __('A message with further instructions has been sent to your email address: %s', $mail));
            }
            $this->setData('content-template', array('passwordRecovery/password-recovery-info.tpl', 'tao'));
        } else {
            $this->setData('form', $form->render());
            $this->setData('content-template', array('passwordRecovery/index.tpl', 'tao'));
        }

        $this->setView('layout.tpl', 'tao');
    }
public function index()
    {
        $this->defaultData();
        $formContainer = new tao_actions_form_PasswordRecovery();
        $form = $formContainer->getForm();

        if ($form->isSubmited() && $form->isValid()) {
            $mail = $form->getValue('userMail');
            $user = $this->getPasswordRecovery()->getUser(GenerisRdf::PROPERTY_USER_MAIL, $mail);

            if ($user !== null) {
                $this->logInfo("User requests a password (user URI: {$user->getUri()})");
                $this->sendMessage($user);
            } else {
                $this->logInfo("Unsuccessful recovery password. Entered e-mail address: {$mail}.");
                $this->setData('header', __('An email has been sent'));
                $this->setData('info', __('A message with further instructions has been sent to your email address: %s', $mail));
            }
            $this->setData('content-template', array('passwordRecovery/password-recovery-info.tpl', 'tao'));
        } else {
            $this->setData('form', $form->render());
            $this->setData('content-template', array('passwordRecovery/index.tpl', 'tao'));
        }

        $this->setView('layout.tpl', 'tao');
    }
public function index ( ) { $ this -> defaultData ( ) ; $ formContainer = new tao_actions_form_PasswordRecovery ( ) ; $ form = $ formContainer -> getForm ( ) ; if ( $ form -> isSubmited ( ) && $ form -> isValid ( ) ) { $ mail = $ form -> getValue ( 'userMail' ) ; $ user = $ this -> getPasswordRecovery ( ) -> getUser ( GenerisRdf :: PROPERTY_USER_MAIL , $ mail ) ; if ( $ user !== null ) { $ this -> logInfo ( "User requests a password (user URI: {$user->getUri()})" ) ; $ this -> sendMessage ( $ user ) ; } else { $ this -> logInfo ( "Unsuccessful recovery password. Entered e-mail address: {$mail}." ) ; $ this -> setData ( 'header' , __ ( 'An email has been sent' ) ) ; $ this -> setData ( 'info' , __ ( 'A message with further instructions has been sent to your email address: %s' , $ mail ) ) ; } $ this -> setData ( 'content-template' , array ( 'passwordRecovery/password-recovery-info.tpl' , 'tao' ) ) ; } else { $ this -> setData ( 'form' , $ form -> render ( ) ) ; $ this -> setData ( 'content-template' , array ( 'passwordRecovery/index.tpl' , 'tao' ) ) ; } $ this -> setView ( 'layout.tpl' , 'tao' ) ; }
Show password recovery request form

@author Aleh Hutnikau <hutnikau@1pt.com>
@return void
Show password recovery request form