You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -206,6 +206,23 @@ function user_settings_update($event_name, $data) {
206
206
return;
207
207
}
208
208
209
+
$entries_to_update = [
210
+
'mail_user' => [],
211
+
'mail_forwarding' => []
212
+
];
213
+
if($is_domain === true) {
214
+
// get all child records to update / delete
215
+
$mailusers = $app->db->queryAllRecords("SELECT mu.* FROM mail_user as mu LEFT JOIN spamfilter_users as su ON (su.email = mu.email) WHERE mu.email LIKE ? AND su.id IS NULL", '%' . $email_address);
216
+
if(is_array($mailusers) && !empty($mailusers)) {
217
+
$entries_to_update['mail_user'] = $mailusers;
218
+
}
219
+
220
+
$forwardings = $app->db->queryAllRecords("SELECT mf.* FROM mail_forwarding as mf LEFT JOIN spamfilter_users as su ON (su.email = mf.source) WHERE mf.source LIKE ? AND su.id IS NULL", '%' . $email_address);
$policy = $app->db->queryOneRecord("SELECT p.* FROM spamfilter_users as u INNER JOIN spamfilter_policy as p ON (p.id = u.policy_id) WHERE u.server_id = ? AND u.email IN ? ORDER BY u.priority DESC", $conf['server_id'], $search_for_policy);
0 commit comments