Browse Source

smaller fixes

andre 5 years ago
parent
commit
9ce733334a
1 changed files with 3 additions and 3 deletions
  1. 3 3
      zimbraSingle.php

+ 3 - 3
zimbraSingle.php

@@ -523,7 +523,7 @@ function zimbraSingle_CreateAccount($params)
             "Error: could not decrypt password",
             "Error: could not decrypt password",
             $passDecrypt
             $passDecrypt
             );
             );
-            return false;
+            return "Error: could not decrypt password";
     }
     }
     $account_name = $params['customfields']['username'] . '@' . $params['customfields']['maildomain'];
     $account_name = $params['customfields']['username'] . '@' . $params['customfields']['maildomain'];
     $cosID = $apiAccountManager->getCosId($params['customfields']['cos']);
     $cosID = $apiAccountManager->getCosId($params['customfields']['cos']);
@@ -535,7 +535,7 @@ function zimbraSingle_CreateAccount($params)
             "Error: serviceclass not available",
             "Error: serviceclass not available",
             $cosID
             $cosID
         );
         );
-        return false;
+        return "Error: serviceclass not available";
     }
     }
     $attrs['zimbraCOSId'] = $cosID;
     $attrs['zimbraCOSId'] = $cosID;
     $id = $apiAccountManager->createAccount($account_name, $params['customfields']['password'], $attrs);
     $id = $apiAccountManager->createAccount($account_name, $params['customfields']['password'], $attrs);
@@ -547,7 +547,7 @@ function zimbraSingle_CreateAccount($params)
             "Error: account $account_name not created",
             "Error: account $account_name not created",
             $id
             $id
         );
         );
-        return false;
+        return "Error: account $account_name not created";
     }
     }
     return 'success';
     return 'success';
 }
 }