Skip to content

Commit 86829f4

Browse files
author
Kristan Kenney
committed
Check webmail alias when editing mail accounts
1 parent 8648900 commit 86829f4

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

web/add/mail/index.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@
5353
// Set domain name to lowercase and remove www prefix
5454
$v_domain = preg_replace("/^www./i", "", $_POST['v_domain']);
5555
$v_domain = strtolower($v_domain);
56+
exec (HESTIA_CMD."v-list-mail-domain ".$user." ".escapeshellarg($v_domain)." json", $output, $return_var);
57+
$data = json_decode(implode('', $output), true);
58+
unset($output);
59+
$v_webmail_alias = $data[$v_domain]['WEBMAIL_ALIAS'];
5660

5761
// Add mail domain
5862
if (empty($_SESSION['error_msg'])) {
@@ -78,9 +82,6 @@
7882
exit();
7983
}
8084

81-
// Set webmail alias
82-
$v_webmail_alias = $data[$v_domain]['WEBMAIL_ALIAS'];
83-
8485
// Check empty fields
8586
if (empty($_POST['v_domain'])) $errors[] = __('domain');
8687
if (empty($_POST['v_account'])) $errors[] = __('account');

web/edit/mail/index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
$v_quota = $data[$v_account]['QUOTA'];
9999
$v_autoreply = $data[$v_account]['AUTOREPLY'];
100100
$v_suspended = $data[$v_account]['SUSPENDED'];
101+
$v_webmail_alias = $data[$v_account]['WEBMAIL_ALIAS'];
101102
if ( $v_suspended == 'yes' ) {
102103
$v_status = 'suspended';
103104
} else {

0 commit comments

Comments
 (0)