andre 2 år sedan
förälder
incheckning
ab2c9c3d53

+ 9 - 0
api/KerioWhmcs.php

@@ -491,6 +491,15 @@ class KerioWhmcs extends KerioConnectApi {
 			'pattern' => $attr
 		);
 		$result = $this->sendRequest('Users.set', $params);
+
+		logModuleCall(
+			'kerioEmail',
+			__FUNCTION__,
+			$params,
+			'Debug Error',
+			$result
+		);
+
 		return $result;
 	}
 

+ 1 - 1
app/UI/Client/EmailAccount/Providers/EditAccountDataProvider.php

@@ -226,8 +226,8 @@ class EditAccountDataProvider extends BaseDataProvider
         $productManager = new ProductManager();
         $productManager->loadByHostingId($hid);
 
-        $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
         $status['isEnabled'] = $this->formData['status'] === 'active' ? TRUE : FALSE;
+        $api = new KerioWhmcs('whmcsKerioEmail', 'Thurdata', '1.0');
         try {
             $result = $api->modifyUser($this->formData['id'], $status);
         } catch (KerioApiException $error) {