From cdee6dfdc34362f5c7124a5f0d74f9246fc17ecc Mon Sep 17 00:00:00 2001 From: Janos SUTO Date: Wed, 8 Dec 2021 08:48:45 +0100 Subject: [PATCH] Improved delete_user() function Signed-off-by: Janos SUTO --- webui/model/user/user.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webui/model/user/user.php b/webui/model/user/user.php index 18d6d9c3..8e507a5f 100644 --- a/webui/model/user/user.php +++ b/webui/model/user/user.php @@ -557,6 +557,9 @@ class ModelUserUser extends Model { $query = $this->db->query("DELETE FROM " . TABLE_EMAIL . " WHERE uid=?", array((int)$uid)); $query = $this->db->query("DELETE FROM " . TABLE_USER . " WHERE uid=?", array((int)$uid)); + $query = $this->db->query("DELETE FROM " . TABLE_USER_SETTINGS . " WHERE username IN (SELECT username FROM " . TABLE_USER . " WHERE uid=?)", array((int)$uid)); + $query = $this->db->query("DELETE FROM " . TABLE_DOMAIN_USER . " WHERE uid=?", array((int)$uid)); + $query = $this->db->query("DELETE FROM " . TABLE_FOLDER_USER . " WHERE uid=?", array((int)$uid)); LOGGER("remove user: uid=$uid");