public function toggleTwoFactor(int $userID, array $post) : bool
{
if (!empty($post['reset_secret'])) {
$this->resetTwoFactorSecret($userID);
}
$this->db->beginTransaction();
$this->db->update('airship_users', ['enable_2factor' => !empty($post['enable_two_factor'])], ['userid' => $userID]);
return $this->db->commit();
}