Branch 'kolab-webadmin-3.1' - lib/api

Aleksander Machniak machniak at kolabsys.com
Fri Sep 5 11:34:46 CEST 2014


 lib/api/kolab_api_service_user.php |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 18619fbf94fc92c597d3e8ff14cc11a84c18fffe
Author: Aleksander Machniak <alec at alec.pl>
Date:   Fri Sep 5 11:34:24 2014 +0200

    Fix user.info result if user wasn't found

diff --git a/lib/api/kolab_api_service_user.php b/lib/api/kolab_api_service_user.php
index 4d985bb..615ad73 100644
--- a/lib/api/kolab_api_service_user.php
+++ b/lib/api/kolab_api_service_user.php
@@ -172,7 +172,7 @@ class kolab_api_service_user extends kolab_api_service
         // normalize result
         $result = $this->parse_result_attributes('user', $result);
 
-        if (empty($result['ou'])) {
+        if (!empty($result) && empty($result['ou'])) {
             $_dn = ldap_explode_dn($result_dn, 0);
             // pop the count and rdn
             unset($_dn['count']);




More information about the commits mailing list