|
|
@@ -133,7 +133,8 @@ class EditSettingDataProvider extends BaseDataProvider
|
|
|
'dmarcmulti' => $dmarcmulti,
|
|
|
'spfmulti' => $spfmulti,
|
|
|
'tfaenabled' => $tfaenabled,
|
|
|
- 'dkimsigenabled' => $dkimsigenabled
|
|
|
+ 'dkimsigenabled' => $dkimsigenabled,
|
|
|
+ 'domainid' => $domainID
|
|
|
];
|
|
|
}
|
|
|
|
|
|
@@ -149,7 +150,9 @@ class EditSettingDataProvider extends BaseDataProvider
|
|
|
'editspf',
|
|
|
'editdmarc',
|
|
|
'editdkim',
|
|
|
- 'dkimname'
|
|
|
+ 'dkimname',
|
|
|
+ 'tfaenabled',
|
|
|
+ 'dkimsigenabled'
|
|
|
];
|
|
|
|
|
|
foreach ($this->formData as $field => &$value)
|
|
|
@@ -157,6 +160,27 @@ class EditSettingDataProvider extends BaseDataProvider
|
|
|
$value = in_array($field, $fieldToProtection) ? htmlentities($value) : $value;
|
|
|
}
|
|
|
|
|
|
+ // $maildomain = $this->actionElementId;
|
|
|
+
|
|
|
+
|
|
|
+ $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']);
|
|
|
+ } catch (KerioApiException $error) {
|
|
|
+ logModuleCall(
|
|
|
+ 'kerioEmail',
|
|
|
+ __FUNCTION__,
|
|
|
+ $error,
|
|
|
+ 'Debug Error',
|
|
|
+ $error->getMessage()
|
|
|
+ );
|
|
|
+ return ['error' => $error->getMessage()];
|
|
|
+ }
|
|
|
+ $api->logout();
|
|
|
+
|
|
|
+
|
|
|
$dnsParams = array(
|
|
|
'maildomain' => $this->formData['editmaildomain'],
|
|
|
'mx' => $this->formData['editmxactive'],
|