|
|
@@ -226,13 +226,19 @@ class EditAccountDataProvider extends BaseDataProvider
|
|
|
$productManager = new ProductManager();
|
|
|
$productManager->loadByHostingId($hid);
|
|
|
|
|
|
- logModuleCall(
|
|
|
- 'kerioEmail',
|
|
|
- __FUNCTION__,
|
|
|
- $this->formData['status'],
|
|
|
- 'Debug UpdateStatus',
|
|
|
- $this->formData['id']
|
|
|
- );
|
|
|
+ $status['isEnabled'] = $this->formData['status'] === 'active' ? TRUE : FALSE;
|
|
|
+ try {
|
|
|
+ $result = $api->modifyUser($this->formData['id'], $status);
|
|
|
+ } catch (KerioApiException $error) {
|
|
|
+ logModuleCall(
|
|
|
+ 'kerioEmail',
|
|
|
+ __FUNCTION__,
|
|
|
+ $error,
|
|
|
+ 'Debug Error',
|
|
|
+ $error->getMessage()
|
|
|
+ );
|
|
|
+ return ['error' => $error->getMessage()];
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* return success
|