summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/api/kolab_api_service_user.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/api/kolab_api_service_user.php b/lib/api/kolab_api_service_user.php
index 1d46a75..202510d 100644
--- a/lib/api/kolab_api_service_user.php
+++ b/lib/api/kolab_api_service_user.php
@@ -209,8 +209,12 @@ class kolab_api_service_user extends kolab_api_service
// find user(s)
$users = $auth->list_users(null, $attributes, $search, $params);
- if (empty($users) || empty($users['list']) || $users['count'] > 1) {
- return false;
+ if (empty($users) || empty($users['list'])) {
+ return Array();
+ }
+
+ if ($users['count'] > 1) {
+ raise Exception, "More than a single entry found.";
}
// get user data