|
|
@@ -70,9 +70,15 @@ class UpdateAccount extends CreateAccount
|
|
|
$account->setAttr(Account::ATTR_COMPANY, $this->formData['company']);
|
|
|
$account->setAttr(Account::ATTR_ACCOUNT_STATUS, $this->formData['status']);
|
|
|
$account->setAttr(Account::ATTR_DISPLAY_NAME, $this->formData['display_name']);
|
|
|
- $account->setAttr(Account::ATTR_MAIL_FORWARD, $this->formData['zimbraPrefMailForwardingAddress']);
|
|
|
- $account->setAttr(Account::ATTR_DISABLE_LOCAL, $this->formData['zimbraPrefMailLocalDeliveryDisabled']);
|
|
|
- $account->setAttr(Account::ATTR_ENABLE_FORWARD, $this->formData['zimbraFeatureMailForwardingEnabled']);
|
|
|
+ if ($this->formData['forward'] == 'on') {
|
|
|
+ $account->setAttr(Account::ATTR_MAIL_FORWARD, $this->formData['zimbraPrefMailForwardingAddress']);
|
|
|
+ $account->setAttr(Account::ATTR_DISABLE_LOCAL, TRUE);
|
|
|
+ $account->setAttr(Account::ATTR_ENABLE_FORWARD, TRUE);
|
|
|
+ } else {
|
|
|
+ $account->setAttr(Account::ATTR_MAIL_FORWARD, NULL);
|
|
|
+ $account->setAttr(Account::ATTR_DISABLE_LOCAL, FALSE);
|
|
|
+ $account->setAttr(Account::ATTR_ENABLE_FORWARD, FALSE);
|
|
|
+ }
|
|
|
return $account;
|
|
|
|
|
|
}
|