コード例 #1
0
 public function actionPasswordReset()
 {
     $model = new PasswordResetForm();
     if ($model->load(Yii::$app->request->post()) && $model->validate()) {
         if ($model->resetPasword()) {
             Yii::$app->getSession()->setFlash('success', Module::t('module', 'FLASH_PASSWORD_RESET_EMAIL'));
             return $this->goHome();
         } else {
             Yii::$app->getSession()->setFlash('error', Module::t('module', 'FLASH_PASSWORD_RESET_ERROR'));
         }
     }
     return $this->render('passwordReset', ['model' => $model]);
 }