|
@@ -46,10 +46,30 @@ class EditAccountDataProvider extends BaseDataProvider
|
|
|
/**
|
|
/**
|
|
|
* load api
|
|
* load api
|
|
|
*/
|
|
*/
|
|
|
- $api = (new KerioManager())->getApiByServer($hosting->server);
|
|
|
|
|
-
|
|
|
|
|
- $repository = new Repository($api->soap);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
|
|
|
+ try {
|
|
|
|
|
+ $api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|
|
|
|
|
+// $domains = $api->getDomains(['id','name']);
|
|
|
|
|
+ } catch (KerioApiException $error) {
|
|
|
|
|
+ logModuleCall(
|
|
|
|
|
+ 'kerioEmail',
|
|
|
|
|
+ __FUNCTION__,
|
|
|
|
|
+ $error,
|
|
|
|
|
+ 'Debug Error',
|
|
|
|
|
+ $error->getMessage()
|
|
|
|
|
+ );
|
|
|
|
|
+ return ['error' => $error->getMessage()];
|
|
|
|
|
+ }
|
|
|
|
|
+ $api->logout();
|
|
|
|
|
+
|
|
|
|
|
+ logModuleCall(
|
|
|
|
|
+ 'kerioEmail',
|
|
|
|
|
+ __FUNCTION__,
|
|
|
|
|
+ $this->actionElementId,
|
|
|
|
|
+ 'Debug Error',
|
|
|
|
|
+ $this
|
|
|
|
|
+ );
|
|
|
|
|
+/*
|
|
|
$result = $repository->accounts->getAccountOptionsById($this->actionElementId);
|
|
$result = $repository->accounts->getAccountOptionsById($this->actionElementId);
|
|
|
|
|
|
|
|
if($result instanceof Response && $result->getLastError())
|
|
if($result instanceof Response && $result->getLastError())
|
|
@@ -90,7 +110,7 @@ class EditAccountDataProvider extends BaseDataProvider
|
|
|
Kerio::ACC_STATUS_PENDING => $lang->absoluteT('kerio','account','status','pending')
|
|
Kerio::ACC_STATUS_PENDING => $lang->absoluteT('kerio','account','status','pending')
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
- $this->readCosParams();
|
|
|
|
|
|
|
+ $this->readCosParams(); */
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|