|
|
@@ -505,7 +505,18 @@ function zimbraSingle_CreateAccount($params)
|
|
|
return $login->getMessage();
|
|
|
}
|
|
|
$apiAccountManager = new Zm_Account($api);
|
|
|
- if($apiAccountManager->accountExists($account_name)) {
|
|
|
+ $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) {
|
|
|
return 'Account already exist';
|
|
|
}
|
|
|
$attrs = array();
|