Workaround for those bold enough:
1) nano /usr/local/cwpsrv/var/services/users/cwp_theme/original/js/jsfix.php
<?php
$user = $_GET['user'];
$data = array("key" => "","action"=>'list',"user"=>"{$user}");
$url = "https://LOCALHOST:2302/v1/ftpaccount";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt ($ch, CURLOPT_POST, 1);
$response = curl_exec($ch);
curl_close($ch);
$vars = json_decode($response);
$js = "[";
foreach($vars->userftp as $key => $value) {
$vals = explode("\t",$value);
#var_dump($vals);
$val = explode("@",$vals[0]);
#var_dump($val);
if ($val[0] != "") {
$js .= "{\"username\":\"".$val[0]."\",\"domain\":\"".$val[1]."\",\"path\":\"".$vals[1]."\"},";
}
}
$js = rtrim($js,",");
$js .= "]";
$js = str_replace("/","\/",$js);
echo $js;
?>
Step 2:
nano /usr/local/cwpsrv/var/services/users/cwp_theme/original/js/modules/ftp_accounts.js.twig
At the very top of the file is "let ftp_list = JSON.parse('{{mod.ftp_account_list|json_encode|raw}}');"
Replace with below
// CECILIO MORALES JS
$.ajaxSetup({
async: false
});
$.get( "/cwp_theme/original/js/jsfix.php", { user: "{{users}}" } )
.done(function( data ) {
ftp_listdata = data;
});
let ftp_list = JSON.parse(ftp_listdata);
//let ftp_list = JSON.parse('{{mod.ftp_account_list|json_encode|raw}}');