public function recoverAccount(string $token = '')
{
if ($this->isLoggedIn()) {
\Airship\redirect($this->airship_cabin_prefix);
}
$this->storeLensVar('showmenu', false);
$enabled = $this->config('password-reset.enabled');
if (empty($enabled)) {
\Airship\redirect($this->airship_cabin_prefix);
}
$post = $this->post(new RecoveryFilter());
if ($post) {
$this->processRecoverAccount($post);
$this->storeLensVar('form_message', \__("Please check the email associated with this username. " . "If this username is valid (and opted into account " . "recovery), then you should receive an email. If we " . "have your GnuPG public key on file, the email will be " . "encrypted."));
}
if (!empty($token)) {
$this->processRecoveryToken($token);
}
$this->lens('recover_account');
}