Browse Source

add Account

andre 2 years ago
parent
commit
e93064ce22
1 changed files with 9 additions and 8 deletions
  1. 9 8
      app/UI/Client/EmailAccount/Providers/AccountDataProvider.php

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

@@ -88,6 +88,15 @@ class AccountDataProvider extends BaseDataProvider
         if ($domainID === FALSE) {
             return "Error: Domain $maildomain not found";
         }
+
+        logModuleCall(
+            'kerioEmail',
+            __FUNCTION__,
+            $domainID,
+            'Debug Add Account',
+            $this->formData
+        );
+
         $active = $this->formData['status'] === 'active' ? TRUE : FALSE;
         try {
             $userID = $api->createUser($domainID, $this->formData['username'], $this->formData['password'], $active);
@@ -120,14 +129,6 @@ class AccountDataProvider extends BaseDataProvider
         $fields['departmentName'] = $this->formData['department'];
         $fields['profession'] = $this->formData['profession'];
 
-        logModuleCall(
-            'kerioEmail',
-            __FUNCTION__,
-            $domainID,
-            'Debug Add Account',
-            $userID
-        );
-
         return (new HtmlDataJsonResponse())->setMessageAndTranslate('emailAccountHasBeenAdded')->setStatusSuccess();
 
     }