public function requestReset()
  {
    if (isset($_POST['requestReset'])) {
      if ($_POST['email'] == '') {
        $this->errors[] = 'Input Email!';
      }
      if (!R::count('users', 'email = ?', array($_POST['email']))) {
        $this->errors[] = 'This account not found!';
      }
      if (empty($this->errors)) {
        $_SESSION['reset'] = [
            'token' => token(),
            'email' => $_POST['email']
        ];

        $link = siteURL()."restore/".$_SESSION['reset']['token'];
        Mailer::smtpStart();
        Mailer::$mail->addAddress($_POST['email']);    
        Mailer::$mail->isHTML(true);
        Mailer::$mail->Subject = 'Password recovery';
        Mailer::$mail->Body = "<a href='{$link}'>Password recovery link</a>";
        Mailer::$mail->setFrom(getenv('SMTP_USER_NAME'), 'Password recovery');
        Mailer::$mail->send();

        echo "<div class='alert alert-success' role='alert'>A password recovery link has been sent to the email</div>";
      } else {
        echo "<div class='alert alert-danger' role='alert'>" . array_shift($this->errors) . "</div>";
      }
    }
  }