diff --git a/html/inc/delete_account.inc b/html/inc/delete_account.inc
index 8b6443fcd5..d949563476 100644
--- a/html/inc/delete_account.inc
+++ b/html/inc/delete_account.inc
@@ -16,6 +16,10 @@
// You should have received a copy of the GNU Lesser General Public License
// along with BOINC. If not, see .
+// Constants for
+define("DELETE_ACCOUNT_METHOD_OBFUSCATE", 1);
+define("DELETE_ACCOUNT_METHOD_WIPE", 2);
+
$config = get_config();
if ( !parse_bool($config, "enable_delete_account") ) {
error_page(
@@ -30,4 +34,32 @@ function check_delete_account_token($userid, $token) {
tra("The token you used has expired or is otherwise not valid. Please request a new one here")
);
}
+}
+
+/*
+* This method selects which delete method to utilize. Projects can implement their own method
+* and make that a third mechanism if they have a need to
+*/
+function delete_account($userid) {
+ $enable_delete_account = parse_int($config, "enable_delete_account");
+ if ( $enable_delete_account == DELETE_ACCOUNT_METHOD_OBFUSCATE ) {
+ return obfuscate_account($userid);
+ } else if ( $enable_delete_account == DELETE_ACCOUNT_METHOD_WIPE ) {
+ return wipe_account($userid);
+ } else {
+ error_page(
+ tra("This feature is configured incorrectly. Please contact the project administrator.")
+ );
+ }
+}
+
+// This method obfuscates all personal information but
+// leaves critical db records in place
+function obfuscate_account($userid) {
+
+}
+
+// This method deletes all rows from the database associated with the user
+function wipe_account($userid) {
+
}
\ No newline at end of file
diff --git a/html/user/delete_account_confirm.php b/html/user/delete_account_confirm.php
index 4961092726..dcadd70903 100644
--- a/html/user/delete_account_confirm.php
+++ b/html/user/delete_account_confirm.php
@@ -57,7 +57,7 @@ function delete_account_confirm_action() {
$passwd = post_str("passwd");
check_passwd_ui($user, $passwd);
- //do account delete
+ delete_account($user->id);
page_head(tra("Account Deleted"));