andre 5 lat temu
rodzic
commit
d0791e369e
1 zmienionych plików z 1 dodań i 12 usunięć
  1. 1 12
      zimbraSingle.php

+ 1 - 12
zimbraSingle.php

@@ -505,18 +505,7 @@ function zimbraSingle_CreateAccount($params)
         return $login->getMessage();
         return $login->getMessage();
     }
     }
     $apiAccountManager = new Zm_Account($api);
     $apiAccountManager = new Zm_Account($api);
-    $accountExists = $apiAccountManager->accountExists($account_name);
-    if(is_a($accountExists, "Exception")) {
-        logModuleCall(
-            'zimbrasingle',
-            __FUNCTION__,
-            $params,
-            "Error: could not check account availibility",
-            $account_name
-        );
-        return false;
-    }
-    if($accountExists === true) {
+    if($apiAccountManager->accountExists($account_name)) {
         return 'Account already exist';
         return 'Account already exist';
     }
     }
     $attrs = array();
     $attrs = array();