From 28cd07d1a75c4e9dcaecac49efee0091f2fc62fa Mon Sep 17 00:00:00 2001
From: A. Täffner <darkalex@firesplash.de>
Date: Thu, 07 Apr 2016 05:30:49 -0400
Subject: [PATCH] Implemented a checkbox "enable DNSSEC" in DNS-Wizard. This Checkbox can be enabled or disabled by template.
---
interface/web/mail/mail_user_del.php | 33 ++++++++++++++++++++++++++++-----
1 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/interface/web/mail/mail_user_del.php b/interface/web/mail/mail_user_del.php
index 26215cf..dc92047 100644
--- a/interface/web/mail/mail_user_del.php
+++ b/interface/web/mail/mail_user_del.php
@@ -39,13 +39,36 @@
* End Form configuration
******************************************/
-require_once('../../lib/config.inc.php');
-require_once('../../lib/app.inc.php');
+require_once '../../lib/config.inc.php';
+require_once '../../lib/app.inc.php';
//* Check permissions for module
$app->auth->check_module_permissions('mail');
-$app->uses("tform_actions");
-$app->tform_actions->onDelete();
+// Loading classes
+$app->uses('tpl,tform,tform_actions');
+$app->load('tform_actions');
-?>
\ No newline at end of file
+class page_action extends tform_actions {
+
+ function onBeforeDelete() {
+ global $app; $conf;
+
+ $tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = ?", $this->dataRecord["email"]);
+ $app->db->datalogDelete('spamfilter_users', 'id', $tmp_user["id"]);
+
+ $tmp_filters = $app->db->queryAllRecords("SELECT filter_id FROM mail_user_filter WHERE mailuser_id = ?", $this->id);
+ if(is_array($tmp_filters)) {
+ foreach($tmp_filters as $tmp) {
+ $app->db->datalogDelete('mail_user_filter', 'filter_id', $tmp["filter_id"]);
+ }
+ }
+
+ }
+
+}
+
+$page = new page_action;
+$page->onDelete();
+
+?>
--
Gitblit v1.9.1