Skip to content

Commit de1b22b

Browse files
committed
fix(backend): allow deletion of auto-created profiles when server is already deleted
1 parent 2bdd091 commit de1b22b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/profiles/modules.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ public function process() {
6767
}
6868

6969
if (($profile = Hm_Profiles::get($form['profile_id']))) {
70-
if (array_key_exists('autocreate', $profile)) {
70+
71+
$server = Hm_SMTP_List::get($profile['smtp_id'], false);
72+
73+
if (array_key_exists('autocreate', $profile) && $server) {
7174
Hm_Msgs::add('Automatically created profile cannot be deleted', 'warning');
7275
return;
7376
}

0 commit comments

Comments
 (0)