|
|
@@ -31,7 +31,7 @@ class EditSettingDataProvider extends BaseDataProvider
|
|
|
try {
|
|
|
$api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|
|
|
$dkimSet = $api->getDkimDnsRecord($maildomain);
|
|
|
- $securitys = $api->getDomains(['id','name','isDkimEnabled','twoFAEnabled']);
|
|
|
+ $features = $api->getDomains(['id','name','isDkimEnabled','twoFAEnabled','isInstantMessagingEnabled']);
|
|
|
} catch (KerioApiException $error) {
|
|
|
logModuleCall(
|
|
|
'kerioEmail',
|
|
|
@@ -44,11 +44,12 @@ class EditSettingDataProvider extends BaseDataProvider
|
|
|
}
|
|
|
$api->logout();
|
|
|
// find own domain
|
|
|
- foreach($securitys as $security) {
|
|
|
- if($security['name'] === $maildomain){
|
|
|
- $domainID = $security['id'];
|
|
|
- $security['twoFAEnabled'] == true ? $tfaenabled = 'on' : $tfaenabled = 'off' ;
|
|
|
- $security['isDkimEnabled'] == true ? $dkimsigenabled = 'on' : $dkimsigenabled = 'off';
|
|
|
+ foreach($features as $feature) {
|
|
|
+ if($feature['name'] === $maildomain){
|
|
|
+ $domainID = $feature['id'];
|
|
|
+ $feature['twoFAEnabled'] == true ? $tfaenabled = 'on' : $tfaenabled = 'off' ;
|
|
|
+ $feature['isDkimEnabled'] == true ? $dkimsigenabled = 'on' : $dkimsigenabled = 'off';
|
|
|
+ $feature['isInstantMessagingEnabled'] == true ? $chatenabled = 'on' : $chatenabled = 'off';
|
|
|
}
|
|
|
}
|
|
|
// format dkim response
|
|
|
@@ -133,6 +134,7 @@ class EditSettingDataProvider extends BaseDataProvider
|
|
|
'dmarcmulti' => $dmarcmulti,
|
|
|
'spfmulti' => $spfmulti,
|
|
|
'tfaenabled' => $tfaenabled,
|
|
|
+ 'chatenabled' => $chatenabled,
|
|
|
'dkimsigenabled' => $dkimsigenabled,
|
|
|
'domainid' => $domainID
|
|
|
];
|
|
|
@@ -152,6 +154,7 @@ class EditSettingDataProvider extends BaseDataProvider
|
|
|
'editdkim',
|
|
|
'dkimname',
|
|
|
'tfaenabled',
|
|
|
+ 'chatenabled',
|
|
|
'dkimsigenabled',
|
|
|
'domainid'
|
|
|
];
|
|
|
@@ -166,6 +169,7 @@ class EditSettingDataProvider extends BaseDataProvider
|
|
|
if ($maildomain == $domain) {
|
|
|
$this->formData['dkimsigenabled'] == 'on' ? $attr['isDkimEnabled'] = true : $attr['isDkimEnabled'] = false;
|
|
|
$this->formData['tfaenabled'] == 'on' ? $attr['twoFAEnabled'] = true : $attr['twoFAEnabled'] = false;
|
|
|
+ $this->formData['chatenabled'] == 'on' ? $attr['isInstantMessagingEnabled'] = true : $attr['isInstantMessagingEnabled'] = false;
|
|
|
$api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
|
try {
|
|
|
$api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|