andre il y a 2 ans
Parent
commit
5a6c6bbc37
1 fichiers modifiés avec 20 ajouts et 1 suppressions
  1. 20 1
      app/UI/Client/EmailAlias/Pages/Aliases.php

+ 20 - 1
app/UI/Client/EmailAlias/Pages/Aliases.php

@@ -67,6 +67,13 @@ class Aliases extends DataTable implements ClientArea
          */
         $hosting = Hosting::where('id', $this->getRequestValue('id'))->first();
 
+        $fields = array(
+            "id",
+            "name",
+            "deliverToId",
+            "deliverTo",
+            "type");
+
         $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
         try {
             $api->login($this->getWhmcsParamByKey('serverhostname'), $this->getWhmcsParamByKey('serverusername'), $this->getWhmcsParamByKey('serverpassword'));
@@ -87,13 +94,25 @@ class Aliases extends DataTable implements ClientArea
                 $this->maildomain = $maildomain['name'];
             }
         }
+        try {
+            $aliases = $api->getAliases($fields,$this->maildomainID);
+        } catch (KerioApiException $error) {
+            logModuleCall(
+                'kerioEmail',
+                __FUNCTION__,
+                $error,
+                'Debug Error',
+                $error->getMessage()
+            );
+            return ['error' => $error->getMessage()];
+        }
 
         logModuleCall(
             'kerioEmail',
             __FUNCTION__,
             $this->maildomainID,
             'Debug Error',
-            $this->maildomain
+            $aliases
         );
 
         $api->logout();