Skip to content

Commit bd7590e

Browse files
authored
Merge pull request #1517 from Yannick243/refact-profile-deletion
fix(backend): allow deletion of auto-created profiles when server is already deleted
2 parents c4a6fa9 + de1b22b commit bd7590e

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)