. require_once("../inc/util.inc"); require_once("../inc/account.inc"); require_once("../inc/delete_account.inc"); require_once("../inc/user_util.inc"); require_once("../inc/email.inc"); $config = get_config(); if (!parse_bool($config, "enable_delete_account")) { error_page( tra("This feature is disabled. Please contact the project administrator.") ); } $user = get_logged_in_user(); if ($user->email_addr_change_time + 7*86400 > time()) { error_page(tra("You are not allowed to delete your account until after 7 days from when you last changed your email address.")); } function delete_account_request_form($user) { page_head(tra("Delete Account")); echo "
".tra("You have the ability to delete your account. Please note that this cannot be undone once it is completed.")."
" ."".tra("The process works as follows:")."
" ."".tra("The email to confirm your request to delete your account has been sent.")."
"; page_tail(); } if ($_SERVER['REQUEST_METHOD'] === 'POST') { delete_account_request_action($user); } else { delete_account_request_form($user); } ?>