Skip to content

Commit e3ba932

Browse files
committed
Fixed: FS#1310 - mailfilter not removed from database
1 parent f150f05 commit e3ba932

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

interface/web/mail/mail_user_del.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ function onBeforeDelete() {
5757
$tmp_user = $app->db->queryOneRecord("SELECT id FROM spamfilter_users WHERE email = '".mysql_real_escape_string($this->dataRecord["email"])."'");
5858
$app->db->datalogDelete('spamfilter_users', 'id', $tmp_user["id"]);
5959

60+
$tmp_filters = $app->db->queryAllRecords("SELECT filter_id FROM mail_user_filter WHERE mailuser_id = '".$this->id."'");
61+
if(is_array($tmp_filters)) {
62+
foreach($tmp_filters as $tmp) {
63+
$app->db->datalogDelete('mail_user_filter', 'filter_id', $tmp["filter_id"]);
64+
}
65+
}
66+
6067
}
6168
}
6269

0 commit comments

Comments
 (0)