#!/usr/bin/env php . // usage: delete_user.php ID // effectively delete the user with given ID // USE THIS WITH EXTREME CAUTION. CAN'T UNDO. require_once("../inc/delete_account.inc"); require_once("../inc/boinc_db.inc"); die("Delete this line first\n"); $config = get_config(); if ( !parse_bool($config, "enable_delete_account") ) { die(tra("This feature is disabled. Please enable it in the config.xml.")); } $id = (int) $argv[1]; $user = BoincUser::lookup_id($id); if (!$user) die("no such user\n"); $retval = delete_account($user); if ( $retval ) { echo tra("User deleted"); } else { echo tra("Failed to delete user"); } ?>