|
|
@@ -152,7 +152,8 @@ class EditSettingDataProvider extends BaseDataProvider
|
|
|
'editdkim',
|
|
|
'dkimname',
|
|
|
'tfaenabled',
|
|
|
- 'dkimsigenabled'
|
|
|
+ 'dkimsigenabled',
|
|
|
+ 'domainid'
|
|
|
];
|
|
|
|
|
|
foreach ($this->formData as $field => &$value)
|
|
|
@@ -162,12 +163,12 @@ class EditSettingDataProvider extends BaseDataProvider
|
|
|
|
|
|
// $maildomain = $this->actionElementId;
|
|
|
|
|
|
-
|
|
|
+ $this->formData['dkimsigenabled'] == 'on' ? $attr['isDkimEnabled'] = true : $attr['isDkimEnabled'] = false;
|
|
|
+ $this->formData['tfaenabled'] == 'on' ? $attr['twoFAEnabled'] = true : $attr['twoFAEnabled'] = false;
|
|
|
$api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
|
try {
|
|
|
$api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|
|
|
- $result = $api->getDkimDnsRecord($maildomain);
|
|
|
- $securitys = $api->getDomains(['id','name','isDkimEnabled','twoFAEnabled']);
|
|
|
+ $result = $api->modifyDomain($this->formData['domainid'], $attr);
|
|
|
} catch (KerioApiException $error) {
|
|
|
logModuleCall(
|
|
|
'kerioEmail',
|
|
|
@@ -180,6 +181,13 @@ class EditSettingDataProvider extends BaseDataProvider
|
|
|
}
|
|
|
$api->logout();
|
|
|
|
|
|
+ logModuleCall(
|
|
|
+ 'kerioEmail',
|
|
|
+ __FUNCTION__,
|
|
|
+ $result,
|
|
|
+ 'Debug result update Kerio domainID: ' . $this->formData['domainid'],
|
|
|
+ $this->formData
|
|
|
+ );
|
|
|
|
|
|
$dnsParams = array(
|
|
|
'maildomain' => $this->formData['editmaildomain'],
|