SiteController::actionForgot PHP Method

actionForgot() public method

Handles resetting a users password should they forgot it
public actionForgot ( )
    public function actionForgot()
    {
        $this->layout = '//layouts/main';
        $this->setPageTitle(Yii::t('ciims.controllers.Site', '{{app_name}} | {{label}}', array('{{app_name}}' => Cii::getConfig('name', Yii::app()->name), '{{label}}' => Yii::t('ciims.controllers.Site', 'Forgot Your Password?'))));
        $model = new ForgotForm();
        if (Cii::get($_POST, 'ForgotForm', false)) {
            $model->attributes = $_POST['ForgotForm'];
            if ($model->initPasswordResetProcess()) {
                Yii::app()->user->setFlash('success', Yii::t('ciims.controllers.Site', 'A password reset link has been sent to your email address'));
                $this->redirect($this->createUrl('site/login'));
            }
        }
        $this->render('forgot', array('model' => $model));
    }