andre 2 年 前
コミット
68c18d19fe
2 ファイル変更5 行追加18 行削除
  1. 1 1
      api/KerioWhmcs.php
  2. 4 17
      app/UI/Client/EmailAlias/Pages/Aliases.php

+ 1 - 1
api/KerioWhmcs.php

@@ -505,7 +505,7 @@ class KerioWhmcs extends KerioConnectApi {
 			'domainId' => $domainId
 			'domainId' => $domainId
 		);
 		);
 		$result = $this->sendRequest('Domains.getUserCountInfo', $params);
 		$result = $this->sendRequest('Domains.getUserCountInfo', $params);
-		return $result;
+		return intval($result['countInfo']['currentUsers']);
 	}
 	}
 
 
 	/**
 	/**

+ 4 - 17
app/UI/Client/EmailAlias/Pages/Aliases.php

@@ -156,8 +156,7 @@ class Aliases extends DataTable implements ClientArea
             return ['error' => $error->getMessage()];
             return ['error' => $error->getMessage()];
         }
         }
         foreach($domains as $maildomain) {
         foreach($domains as $maildomain) {
-//            if(($maildomain['name']) === $this->getWhmcsParamByKey('domain')){ 
-            if(($maildomain['name']) === 'curarex.ch'){ 
+            if(($maildomain['name']) === $this->getWhmcsParamByKey('domain')){ 
                 $this->maildomainID = $maildomain['id'];
                 $this->maildomainID = $maildomain['id'];
                 $this->maildomain = $maildomain['name'];
                 $this->maildomain = $maildomain['name'];
             }
             }
@@ -176,21 +175,9 @@ class Aliases extends DataTable implements ClientArea
         }
         }
         $api->logout();
         $api->logout();
 
 
-/*        $accounts =(new KerioManager())
-            ->getApiByHosting($hid)
-            ->soap
-            ->repository()
-            ->accounts
-            ->getByDomainName($hosting->domain); */
-
-        logModuleCall(
-            'kerioEmail',
-            __FUNCTION__,
-            $accCount,
-            'Debug Error',
-            $this->maildomain
-        );
-
+        if ($accCount > 0) {
             return FALSE;
             return FALSE;
+        }
+        return TRUE;
     }
     }
 }
 }