deactivate(); if(!$success) throw new Exception("Failed to deactivate account. Please try again later."); Core::addAlert("success", "Deactivated account successfully."); HTTP::redirect("/account"); } catch(Exception $e) { Core::addAlert("danger", $e->getMessage()); } } View::includeOnce("header", compact("page_title")); View::include("account_deactivate"); View::includeOnce("footer"); ?>