. // "delete" an account: // - set email address and authenticator to "deleted_pid_time" // - clear name, country, postal_code // - remove from team // - delete posts, subscriptions, and forum prefs // - delete private messages (sent and received) // - delete profile and associated image // for each host: // - clear domain_name, last_ip_addr require_once("../inc/util.inc"); require_once("../inc/host.inc"); require_once("../inc/profile.inc"); require_once("../inc/pm.inc"); check_get_args(array("cmd")); die("This feature has been disabled. Please contact project administators."); function delete_account($user) { $x = "deleted_".time()."_".random_string(); $retval = $user->update("email_addr='$x', authenticator='$x', name='', country='', postal_code='', has_profile=0"); if (!$retval) return false; user_quit_team($user); forum_delete_user($user); pm_delete_user($user); anonymize_hosts($user); delete_profile($user); return true; } $user = get_logged_in_user(); $cmd = get_str("cmd", true); if ($cmd == "delete") { $retval = delete_account($user); if (!$retval) { error_page(tra("Couldn't delete account")); } else { page_head(tra("Account deleted")); echo tra("Your account has been deleted."); page_tail(); } } else { page_head(tra("Confirm delete account")); echo "
".tra("Deleting your account will remove all of your personal information from our servers, including your profile and message-board posts. No jobs will be issued to any computers attached to this account.")."

".tra("This cannot be undone. Once your account has been deleted, you cannot get it back.")."

".tra("Are you sure you want to delete your account?")."

"; show_button("delete_account.php?cmd=delete", tra("Yes"), tra("Delete this account")); show_button("index.php", tra("No"), tra("Do not delete this account")); echo "

\n"; page_tail(); }