function resetPassword()
    {
        $infoMessage = null;
        $formErrors = null;

        $form = new FormResetPassword();
        if ($form->validate()) {
            $nonce = $form->getSubmitValue('form_nonce');
            if (Nonce::verifyNonce('Login.login', $nonce)) {
                $formErrors = $this->resetPasswordFirstStep($form);
                if (empty($formErrors)) {
                    $infoMessage = Piwik::translate('Login_ConfirmationLinkSent');
                }
            } else {
                $formErrors = array($this->getMessageExceptionNoAccess());
            }
        } else {
            // if invalid, display error
            $formData = $form->getFormData();
            $formErrors = $formData['errors'];
        }

        $view = new View('@Login/resetPassword');
        $view->infoMessage = $infoMessage;
        $view->formErrors = $formErrors;

        return $view->render();
    }
function resetPassword()
    {
        $infoMessage = null;
        $formErrors = null;

        $form = new FormResetPassword();
        if ($form->validate()) {
            $nonce = $form->getSubmitValue('form_nonce');
            if (Nonce::verifyNonce('Login.login', $nonce)) {
                $formErrors = $this->resetPasswordFirstStep($form);
                if (empty($formErrors)) {
                    $infoMessage = Piwik::translate('Login_ConfirmationLinkSent');
                }
            } else {
                $formErrors = array($this->getMessageExceptionNoAccess());
            }
        } else {
            // if invalid, display error
            $formData = $form->getFormData();
            $formErrors = $formData['errors'];
        }

        $view = new View('@Login/resetPassword');
        $view->infoMessage = $infoMessage;
        $view->formErrors = $formErrors;

        return $view->render();
    }
function resetPassword ( ) { $ infoMessage = null ; $ formErrors = null ; $ form = new FormResetPassword ( ) ; if ( $ form -> validate ( ) ) { $ nonce = $ form -> getSubmitValue ( 'form_nonce' ) ; if ( Nonce :: verifyNonce ( 'Login.login' , $ nonce ) ) { $ formErrors = $ this -> resetPasswordFirstStep ( $ form ) ; if ( empty ( $ formErrors ) ) { $ infoMessage = Piwik :: translate ( 'Login_ConfirmationLinkSent' ) ; } } else { $ formErrors = array ( $ this -> getMessageExceptionNoAccess ( ) ) ; } } else { // if invalid, display error $ formData = $ form -> getFormData ( ) ; $ formErrors = $ formData [ 'errors' ] ; } $ view = new View ( '@Login/resetPassword' ) ; $ view -> infoMessage = $ infoMessage ; $ view -> formErrors = $ formErrors ; return $ view -> render ( ) ; }
Reset password action. Stores new password as hash and sends email
to confirm use.
Reset password action . Stores new password as hash and sends email to confirm use .