소스 검색

emailAccounts

andre 2 년 전
부모
커밋
e0185ccdb8
2개의 변경된 파일17개의 추가작업 그리고 11개의 파일을 삭제
  1. 16 2
      app/UI/Client/EmailAccount/Pages/Accounts.php
  2. 1 9
      app/UI/Client/EmailAccount/Providers/AccountDataProvider.php

+ 16 - 2
app/UI/Client/EmailAccount/Pages/Accounts.php

@@ -160,19 +160,33 @@ class Accounts extends DataTable implements ClientArea
             );
             return ['error' => $error->getMessage()];
         }
-        $api->logout();
         foreach($domains as $maildomain) {
             if(($maildomain['name']) === $this->getWhmcsParamByKey('domain')){ 
-                $this->maildomain = $maildomain['id'];
+                $this->maildomainID = $maildomain['id'];
             }
         }
         $productManager = new ProductManager();
         $productManager->loadByHostingId($hosting->id);
 
+        $accounts = $api->getUsers([''],$this->maildomainID);
+
+
+        logModuleCall(
+            'kerioEmail',
+            __FUNCTION__,
+            $accounts,
+            'Debug Accounts',
+            $this->maildomainID
+        );
+
         /**
          * format model to array
          */
         $data = [];
+
+
+
+        $api->logout();
 /*        foreach ($accounts as $account)
         {
 

+ 1 - 9
app/UI/Client/EmailAccount/Providers/AccountDataProvider.php

@@ -94,15 +94,7 @@ class AccountDataProvider extends BaseDataProvider
             ->setProductManager($productManager)
             ->setFormData($this->formData);
 
-            logModuleCall(
-                'kerioEmail',
-                __FUNCTION__,
-                $this->data['domain'],
-                'Debug Accounts',
-                $this->maildomain
-            );
-    
-            /**
+        /**
          *
          * run service
          */