|
@@ -206,7 +206,7 @@ class EditAccountDataProvider extends BaseDataProvider
|
|
|
);
|
|
);
|
|
|
return ['error' => $error->getMessage()];
|
|
return ['error' => $error->getMessage()];
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ $api->logout();
|
|
|
return (new HtmlDataJsonResponse())->setMessageAndTranslate('emailAccountHasBeenUpdated')->setStatusSuccess();
|
|
return (new HtmlDataJsonResponse())->setMessageAndTranslate('emailAccountHasBeenUpdated')->setStatusSuccess();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -228,6 +228,18 @@ class EditAccountDataProvider extends BaseDataProvider
|
|
|
|
|
|
|
|
$status['isEnabled'] = $this->formData['status'] === 'active' ? TRUE : FALSE;
|
|
$status['isEnabled'] = $this->formData['status'] === 'active' ? TRUE : FALSE;
|
|
|
$api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
$api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
|
|
|
+ try {
|
|
|
|
|
+ $api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|
|
|
|
|
+ } catch (KerioApiException $error) {
|
|
|
|
|
+ logModuleCall(
|
|
|
|
|
+ 'kerioEmail',
|
|
|
|
|
+ __FUNCTION__,
|
|
|
|
|
+ $error,
|
|
|
|
|
+ 'Debug Error',
|
|
|
|
|
+ $error->getMessage()
|
|
|
|
|
+ );
|
|
|
|
|
+ return ['error' => $error->getMessage()];
|
|
|
|
|
+ }
|
|
|
try {
|
|
try {
|
|
|
$result = $api->modifyUser($this->formData['id'], $status);
|
|
$result = $api->modifyUser($this->formData['id'], $status);
|
|
|
} catch (KerioApiException $error) {
|
|
} catch (KerioApiException $error) {
|
|
@@ -240,7 +252,7 @@ class EditAccountDataProvider extends BaseDataProvider
|
|
|
);
|
|
);
|
|
|
return ['error' => $error->getMessage()];
|
|
return ['error' => $error->getMessage()];
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ $api->logout();
|
|
|
/**
|
|
/**
|
|
|
* return success
|
|
* return success
|
|
|
*/
|
|
*/
|