|
|
@@ -14,7 +14,15 @@ class UsageUpdate extends AddonController
|
|
|
public function execute($params = null)
|
|
|
{
|
|
|
$api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
|
|
|
-
|
|
|
+
|
|
|
+ logModuleCall(
|
|
|
+ 'kerioEmail',
|
|
|
+ __FUNCTION__,
|
|
|
+ $params,
|
|
|
+ 'Debug Usage',
|
|
|
+ $api
|
|
|
+ );
|
|
|
+
|
|
|
try {
|
|
|
$api->login($params['serverhostname'], $params['serverusername'], $params['serverpassword']);
|
|
|
$domains = $api->getDomains(['id','name']);
|
|
|
@@ -68,15 +76,6 @@ class UsageUpdate extends AddonController
|
|
|
|
|
|
Whmcs\Hosting::where('server', $serverId)->where('domain', $domainName)->update(['bwusage' => $mailboxes]);
|
|
|
Whmcs\Hosting::where('server', $serverId)->where('domain', $domainName)->update(['diskusage' => $storage]);
|
|
|
-
|
|
|
- logModuleCall(
|
|
|
- 'kerioEmail',
|
|
|
- __FUNCTION__,
|
|
|
- $storage,
|
|
|
- 'Debug Usage',
|
|
|
- $mailboxes
|
|
|
- );
|
|
|
-
|
|
|
usleep(5000);
|
|
|
}
|
|
|
catch (\Exception $ex)
|