logging for delete user
This commit is contained in:
parent
bb0ebc5d42
commit
44e9714d88
1 changed files with 4 additions and 0 deletions
|
@ -535,7 +535,10 @@ class UserPage extends Extension {
|
|||
"You need to specify the account number to edit"));
|
||||
}
|
||||
else {
|
||||
log_warning("user", "Deleting user #{$_POST['id']}");
|
||||
|
||||
if($with_images) {
|
||||
log_warning("user", "Deleting user #{$_POST['id']}'s uploads");
|
||||
$rows = $database->get_all("SELECT * FROM images WHERE owner_id = :owner_id", array("owner_id" => $_POST['id']));
|
||||
foreach ($rows as $key => $value) {
|
||||
$image = Image::by_id($value['id']);
|
||||
|
@ -552,6 +555,7 @@ class UserPage extends Extension {
|
|||
}
|
||||
|
||||
if($with_comments) {
|
||||
log_warning("user", "Deleting user #{$_POST['id']}'s comments");
|
||||
$database->execute("DELETE FROM comments WHERE owner_id = :owner_id", array("owner_id" => $_POST['id']));
|
||||
}
|
||||
else {
|
||||
|
|
Reference in a new issue