Exemplo n.º 1
0
 /**
  * 验证密码
  *
  * @return array
  */
 public function actionVerifyPassword()
 {
     $model = new VerifyPasswordForm();
     if ($model->load(Yii::$app->request->post(), '') && $model->validate()) {
         return ['status' => 'success', 'data' => []];
     } else {
         return ['status' => 'fail', 'data' => ['errors' => $model->getErrors('password')]];
     }
 }