public function actionResendConfirmationMessage()
 {
     $model = new PasswordResetRequestForm();
     if ($model->sendEmail()) {
         Yii::$app->getSession()->setFlash('success', 'Check your email for further instructions.');
     } else {
         Yii::$app->getSession()->setFlash('error', 'Sorry, we are unable to reset password for email provided.');
     }
 }
 /**
  * Requests password reset.
  *
  * @return mixed
  */
 public function actionRequestPasswordReset()
 {
     $model = new PasswordResetRequestForm();
     if ($model->load(Yii::$app->request->post()) && $model->validate()) {
         if ($model->sendEmail()) {
             Yii::$app->session->setFlash('success', 'Check your email for further instructions.');
             return $this->goHome();
         } else {
             Yii::$app->session->setFlash('error', 'Sorry, we are unable to reset password for email provided.');
         }
     }
     return $this->render('requestPasswordResetToken', ['model' => $model]);
 }