|
@@ -66,8 +66,41 @@ class EditAccountDataProvider extends BaseDataProvider
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
$api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
|
|
$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 {
|
|
|
$domainID = $api->getDomainId($this->getWhmcsParamByKey('customfields')['maildomain']);
|
|
$domainID = $api->getDomainId($this->getWhmcsParamByKey('customfields')['maildomain']);
|
|
|
|
|
+ } catch (KerioApiException $error) {
|
|
|
|
|
+ logModuleCall(
|
|
|
|
|
+ 'kerioEmail',
|
|
|
|
|
+ __FUNCTION__,
|
|
|
|
|
+ $error,
|
|
|
|
|
+ 'Debug Error',
|
|
|
|
|
+ $error->getMessage()
|
|
|
|
|
+ );
|
|
|
|
|
+ return ['error' => $error->getMessage()];
|
|
|
|
|
+ }
|
|
|
|
|
+ try {
|
|
|
$account = $api->getUsers($fields,$domainID,$cond);
|
|
$account = $api->getUsers($fields,$domainID,$cond);
|
|
|
|
|
+ } catch (KerioApiException $error) {
|
|
|
|
|
+ logModuleCall(
|
|
|
|
|
+ 'kerioEmail',
|
|
|
|
|
+ __FUNCTION__,
|
|
|
|
|
+ $error,
|
|
|
|
|
+ 'Debug Error',
|
|
|
|
|
+ $error->getMessage()
|
|
|
|
|
+ );
|
|
|
|
|
+ return ['error' => $error->getMessage()];
|
|
|
|
|
+ }
|
|
|
|
|
+ try {
|
|
|
$address = $api->getAddress($this->actionElementId);
|
|
$address = $api->getAddress($this->actionElementId);
|
|
|
} catch (KerioApiException $error) {
|
|
} catch (KerioApiException $error) {
|
|
|
logModuleCall(
|
|
logModuleCall(
|