|
|
@@ -188,6 +188,25 @@ class AddListDataProvider extends BaseDataProvider
|
|
|
*/
|
|
|
$hid = $this->request->get('id');
|
|
|
|
|
|
+ $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
|
+ try {
|
|
|
+ $api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|
|
|
+ $domainID = $api->getDomainId($this->getWhmcsParamByKey('domain'));
|
|
|
+ } catch (KerioApiException $error) {
|
|
|
+ logModuleCall(
|
|
|
+ 'kerioEmail',
|
|
|
+ __FUNCTION__,
|
|
|
+ $error,
|
|
|
+ 'Debug Error',
|
|
|
+ $error->getMessage()
|
|
|
+ );
|
|
|
+ return ['error' => $error->getMessage()];
|
|
|
+ }
|
|
|
+
|
|
|
+ $paramsCreate['domainId'] = $domainID;
|
|
|
+
|
|
|
+ $api->logout();
|
|
|
+
|
|
|
logModuleCall(
|
|
|
'kerioEmail',
|
|
|
__FUNCTION__,
|