#!/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"); $id = (int) $argv[1]; $user = BoincUser::lookup_id($id); if (!$user) die("no such user\n"); $retval = delete_account($user); if ($retval) { echo "Failed to delete user: $retval\n"; } else { echo "User deleted\n"; } ?>