Browse Source

debug mail forwarding

andre 1 year ago
parent
commit
a78c86a3b9

+ 0 - 9
app/Libs/Zimbra/Components/Api/Soap/Models/Account.php

@@ -153,15 +153,6 @@ class Account extends AbstractModel
      */
      */
     public function setAttr($key, $value = null)
     public function setAttr($key, $value = null)
     {
     {
-
-        logModuleCall(
-            'zimbraEmail',
-            __FUNCTION__,
-            $key,
-            'Debug Acount Action',
-            $value
-        );    
-
         $this->attrs[$key] = $value;
         $this->attrs[$key] = $value;
         return $this;
         return $this;
     }
     }

+ 0 - 8
app/Libs/Zimbra/Components/Api/Soap/Services/Update/UpdateAccount.php

@@ -80,14 +80,6 @@ class UpdateAccount extends CreateAccount
             $account->setAttr(Account::ATTR_ENABLE_FORWARD, FALSE);
             $account->setAttr(Account::ATTR_ENABLE_FORWARD, FALSE);
         }
         }
 
 
-        logModuleCall(
-            'zimbraEmail',
-            __FUNCTION__,
-            $this->formData,
-            'Debug Acount Action',
-            $account
-        );    
-
         return $account;
         return $account;
 
 
     }
     }

+ 9 - 0
app/Libs/Zimbra/Components/Api/Soap/Services/Update/UpdateAccountCosQuota.php

@@ -74,6 +74,15 @@ class UpdateAccountCosQuota extends CreateAccountCosQuota
         $account->setAttr(Account::ATTR_COMPANY, $this->formData['company']);
         $account->setAttr(Account::ATTR_COMPANY, $this->formData['company']);
         $account->setAttr(Account::ATTR_ACCOUNT_STATUS, $this->formData['status']);
         $account->setAttr(Account::ATTR_ACCOUNT_STATUS, $this->formData['status']);
         $account->setAttr(Account::ATTR_DISPLAY_NAME, $this->formData['display_name']);
         $account->setAttr(Account::ATTR_DISPLAY_NAME, $this->formData['display_name']);
+        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);
+        }
 
 
         /* @var $cos ClassOfService*/
         /* @var $cos ClassOfService*/
         $cos = $this->cosModels[$this->formData['cosId']];
         $cos = $this->cosModels[$this->formData['cosId']];