Ver Fonte

add forward section

andre há 1 ano atrás
pai
commit
8ae11eaaa5

+ 7 - 8
app/UI/Client/EmailAccount/Providers/EditAccountDataProvider.php

@@ -149,14 +149,13 @@ class EditAccountDataProvider extends BaseDataProvider
         }
         $account['diskSizeLimit']['limit']['value'] = intval($this->formData['quota']);
         $account['diskSizeLimit']['limit']['units'] = $this->formData['unit'];
-
-        logModuleCall(
-            'kerioEmail',
-            __FUNCTION__,
-            $this->formData,
-            'Debug Formdata',
-            ''
-        );
+        
+        if ( $this->formData['forward'] == 'on') {
+            $account['emailForwarding']['mode'] = 'UForwardYes';
+            $account['emailForwarding']['emailAddresses'] = [ $this->formData['target'] ];
+        } else {
+            $account['emailForwarding']['mode'] = 'UForwardNone';
+        }
 
         $fields['firstName'] = $this->formData['firstname'];
         $fields['surName'] = $this->formData['lastname'];