andre 5 лет назад
Родитель
Сommit
c08ee548f5
2 измененных файлов с 9 добавлено и 10 удалено
  1. 1 2
      api/Zm/Account.php
  2. 8 8
      zimbraSingle.php

+ 1 - 2
api/Zm/Account.php

@@ -257,10 +257,9 @@ class Zm_Account
 		catch (SoapFault $exception)
 		{
 			$result = $exception;
-			return 'blubb';
 		}
 
-		return 'bla';
+		return (!is_a($result, "Exception"));
 	}
 
 	/**

+ 8 - 8
zimbraSingle.php

@@ -516,14 +516,14 @@ function zimbraSingle_CreateAccount($params)
         );
         return false;
     }
-    if($accountExists == 'bla') {
-        logModuleCall(
-            'zimbrasingle',
-            __FUNCTION__,
-            $account_name,
-            "Debug",
-            $accountExists
-        );
+    logModuleCall(
+        'zimbrasingle',
+        __FUNCTION__,
+        $account_name,
+        "Debug",
+        $accountExists
+    );
+    if($accountExists) {
         return 'Account already exist';
     }
     $attrs = array();