|
|
@@ -71,20 +71,29 @@ class CreateAccount extends AddonController
|
|
|
protected function kerioRunService($params = null)
|
|
|
{
|
|
|
$api = new KerioConnectApi('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
|
-
|
|
|
- logModuleCall(
|
|
|
- 'kerioEmail',
|
|
|
- __FUNCTION__,
|
|
|
- $api,
|
|
|
- 'Debug Features & Attributes',
|
|
|
- $params
|
|
|
- );
|
|
|
-
|
|
|
try {
|
|
|
$api->login($params['serverhostname'], $params['serverusername'], $params['serverpassword']);
|
|
|
$result = $api->sendRequest('Domains.get');
|
|
|
- $api->logout();
|
|
|
+
|
|
|
+ logModuleCall(
|
|
|
+ 'kerioEmail',
|
|
|
+ __FUNCTION__,
|
|
|
+ $api,
|
|
|
+ 'Debug Features & Attributes',
|
|
|
+ $result
|
|
|
+ );
|
|
|
+
|
|
|
+ $api->logout();
|
|
|
} catch (KerioApiException $error) {
|
|
|
+
|
|
|
+ logModuleCall(
|
|
|
+ 'kerioEmail',
|
|
|
+ __FUNCTION__,
|
|
|
+ $error,
|
|
|
+ 'Debug Error',
|
|
|
+ $error->getMessage()
|
|
|
+ );
|
|
|
+
|
|
|
return ['error' => $error->getMessage()];
|
|
|
}
|
|
|
|