LotGDocker/lotgd-web/lotgd/lib/user/user_del.php
2020-08-17 19:16:42 -04:00

13 lines
479 B
PHP
Executable File

<?php
$sql = "SELECT name from " . db_prefix("accounts") . " WHERE acctid='$userid'";
$res = db_query($sql);
require_once("lib/charcleanup.php");
char_cleanup($userid, CHAR_DELETE_MANUAL);
while ($row = db_fetch_assoc($res)) {
addnews("`#%s was unmade by the gods.", $row['name'], true);
debuglog("deleted user" . $row['name'] . "'0");
}
$sql = "DELETE FROM " . db_prefix("accounts") . " WHERE acctid='$userid'";
db_query($sql);
output( db_affected_rows()." user deleted.");
?>