public function twoFactorSetup()
{
if (!$this->isLoggedIn()) {
\Airship\redirect($this->airship_cabin_prefix);
}
$this->twoFactorPreamble();
$userID = $this->getActiveUserId();
$post = $this->post(new TwoFactorFilter());
if ($post) {
if ($this->acct->toggleTwoFactor($userID, $post)) {
\Airship\redirect($this->airship_cabin_prefix . '/my/account/2-factor');
}
}
$user = $this->acct->getUserAccount($userID);
$this->lens('two_factor', ['active_link' => 'bridge-link-two-factor', 'enabled' => $user['enable_2factor'] ?? false]);
}