|
|
@@ -27,6 +27,7 @@ class InfoSettingDataProvider 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']);
|
|
|
} catch (KerioApiException $error) {
|
|
|
logModuleCall(
|
|
|
'kerioEmail',
|
|
|
@@ -38,6 +39,14 @@ class InfoSettingDataProvider extends BaseDataProvider
|
|
|
return ['error' => $error->getMessage()];
|
|
|
}
|
|
|
$api->logout();
|
|
|
+ // find own domain
|
|
|
+ foreach($securitys as $security) {
|
|
|
+ if($security['name'] === $maildomain){
|
|
|
+ $domainID = $security['id'];
|
|
|
+ $tfaenabled = $security['twoFAEnabled'];
|
|
|
+ $dkimsigenabled = $security['isDkimEnabled'];
|
|
|
+ }
|
|
|
+ }
|
|
|
// format dkim response
|
|
|
$dkimArray = explode(PHP_EOL,$dkimSet['detail']);
|
|
|
$dkimValue = explode(":",$dkimArray[1]);
|
|
|
@@ -119,7 +128,9 @@ class InfoSettingDataProvider extends BaseDataProvider
|
|
|
'mxmulti' => $mxmulti,
|
|
|
'dkimmulti' => $dkimmulti,
|
|
|
'dmarcmulti' => $dmarcmulti,
|
|
|
- 'spfmulti' => $spfmulti
|
|
|
+ 'spfmulti' => $spfmulti,
|
|
|
+ 'tfaenabled' => $tfaenabled,
|
|
|
+ 'dkimsigenabled' => $dkimsigenabled
|
|
|
];
|
|
|
}
|
|
|
|