Crontab deletion after website removal
Hey, when deleting website which has created any crontab I got error "Parent domain not found" which is triggered by cron_plugin.inc.php, function delete, wherein the beginning is
//* get data from web
$parent_domain = $app->db->queryOneRecord("SELECT `domain_id`, `system_user`, `system_group`, `document_root`, `hd_quota` FROM `web_domain` WHERE `domain_id` = ?", $data["old"]["parent_domain_id"]);
if(!$parent_domain["domain_id"]) {
$app->log("Parent domain not found", LOGLEVEL_WARN);
return 0;
}
The query is empty of course because the record was deleted already when the website was deleted from GUI.
The problem is, when crontab is not deleted and it contains username assigned for a deleted website, this user is no longer available in the system and other crons after this crontab file (in alphabet order) stop working.
The expected behaviour is the deletion of crontab file when deleting a website from WebGUI.