コード例 #1
0
 public function actionValidateRestorepswForm()
 {
     $rstFrm = new RestorePswForm();
     if (Yii::$app->request->isAjax && $rstFrm->load(Yii::$app->request->post())) {
         Yii::$app->response->format = Response::FORMAT_JSON;
         return ActiveForm::validate($rstFrm);
     }
 }
コード例 #2
0
 public function actionRestorepsw()
 {
     $rstFrm = new RestorePswForm();
     if ($rstFrm->load(Yii::$app->request->post()) && $rstFrm->validate()) {
         $ok = $rstFrm->restorePsw();
         if ($ok) {
             return $this->redirect(Url::to('/?mid=2'));
         }
     }
     return $this->goHome();
 }