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