|
|
@@ -56,14 +56,6 @@ class EditAccountDataProvider extends BaseDataProvider
|
|
|
{
|
|
|
throw new \Exception($result->getLastError());
|
|
|
}
|
|
|
- logModuleCall(
|
|
|
- 'zimbraEmail',
|
|
|
- __FUNCTION__,
|
|
|
- $result,
|
|
|
- 'Debug Account',
|
|
|
- ''
|
|
|
- );
|
|
|
-
|
|
|
$mailBoxParams = explode('@', $result->getName());
|
|
|
$this->data['id'] = $result->getId();
|
|
|
$this->data['username'] = $mailBoxParams[0];
|
|
|
@@ -86,7 +78,12 @@ class EditAccountDataProvider extends BaseDataProvider
|
|
|
$this->data['currentCosId'] = $result->getDataResourceA(Account::ATTR_CLASS_OF_SERVICE_ID);
|
|
|
$this->data['cosId'] = $result->getDataResourceA(Account::ATTR_CLASS_OF_SERVICE_ID);
|
|
|
$this->data['state'] = $result->getDataResourceA(Account::ATTR_STATE);
|
|
|
-
|
|
|
+ $this->data['target'] = $result->getDataResourceA(Account::ATTR_MAIL_FORWARD);
|
|
|
+ if (empty($this->data['target'])) {
|
|
|
+ $this->data['forward'] = 'off';
|
|
|
+ } else {
|
|
|
+ $this->data['forward'] = 'on';
|
|
|
+ }
|
|
|
$lang = di('lang');
|
|
|
$this->availableValues['status'] = [
|
|
|
Zimbra::ACC_STATUS_ACTIVE => $lang->absoluteT('zimbra','account','status','active'),
|
|
|
@@ -118,7 +115,11 @@ class EditAccountDataProvider extends BaseDataProvider
|
|
|
{
|
|
|
$value = in_array($field, $fieldToProtection) ? htmlentities($value) : $value;
|
|
|
}
|
|
|
-
|
|
|
+ if ($this->formData['forward'] == 'on') {
|
|
|
+ $this->formData['zimbraPrefMailLocalDeliveryDisabled'] = true;
|
|
|
+ } else {
|
|
|
+ $this->formData['zimbraPrefMailLocalDeliveryDisabled'] = false;
|
|
|
+ }
|
|
|
/**
|
|
|
* product manager allow to check product settings
|
|
|
*/
|
|
|
@@ -148,6 +149,14 @@ class EditAccountDataProvider extends BaseDataProvider
|
|
|
*/
|
|
|
$result = $service->run();
|
|
|
|
|
|
+ logModuleCall(
|
|
|
+ 'zimbraEmail',
|
|
|
+ __FUNCTION__,
|
|
|
+ $result,
|
|
|
+ 'Debug Update',
|
|
|
+ $this->formData
|
|
|
+ );
|
|
|
+
|
|
|
/**
|
|
|
* return success or error response
|
|
|
*/
|