remove waiting createuser - tasks while removing a customer, fixes #276

This commit is contained in:
Florian Aders (EleRas)
2010-06-16 12:28:32 +00:00
parent 1557e5b7a3
commit dcc5859eb8

View File

@@ -194,6 +194,10 @@ if($page == 'customers'
$db->query("DELETE FROM `" . TABLE_FTP_USERS . "` WHERE `customerid`='" . (int)$id . "'");
$db->query("DELETE FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid`='" . (int)$id . "'");
// Delete all waiting "create user" -tasks for this user, #276
// Note: the WHERE selects part of a serialized array, but it should be safe this way
$db->query("DELETE FROM `" . TABLE_PANEL_TASKS . "` WHERE `type` = '2' AND `data` LIKE = '%;\"" . $db->escape($result['loginname']) . "\"%;';");
// remove everything APS-related, #216
$apsresult = $db->query("SELECT `ID` FROM `".TABLE_APS_INSTANCES."` WHERE `CustomerID`='".(int)$id."'");
while($apsrow = $db->fetch_array($apsresult))