File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ json_list() {
3434 "SUSPENDED": "' $SUSPENDED ' ",
3535 "TIME": "' $TIME ' ",
3636 "DATE": "' $DATE ' ",
37- "WEBMAIL_ALIAS": "' $WEBMAIL_ALIAS .$domain ' "'
37+ "WEBMAIL_ALIAS": "' $WEBMAIL_ALIAS .$domain ' "
38+ }'
3839 echo ' }'
3940}
4041
Original file line number Diff line number Diff line change 66// Main include
77include ($ _SERVER ['DOCUMENT_ROOT ' ]."/inc/main.php " );
88
9+ // Get all user domains
10+ exec (HESTIA_CMD ."v-list-mail-domains " .escapeshellarg ($ user )." json " , $ output , $ return_var );
11+ $ user_domains = json_decode (implode ('' , $ output ), true );
12+ $ user_domains = array_keys ($ user_domains );
13+ unset($ output );
14+
15+ $ v_domain = $ _GET ['domain ' ];
16+ if (!empty ($ v_domain )){
17+ if (!in_array ($ v_domain , $ user_domains )) {
18+ header ("Location: /list/mail/ " );
19+ exit ;
20+ }
21+ // Set webmail alias
22+ exec (HESTIA_CMD ."v-list-mail-domain " .escapeshellarg ($ user )." " .escapeshellarg ($ v_domain )." json " , $ output , $ return_var );
23+ $ data = json_decode (implode ('' , $ output ), true );
24+ unset($ output );
25+ $ v_webmail_alias = $ data [$ v_domain ]['WEBMAIL_ALIAS ' ];
26+ }
927
1028// Check POST request for mail domain
1129if (!empty ($ _POST ['ok ' ])) {
You can’t perform that action at this time.
0 commit comments