diff --git a/httpd/eclipse-php-classes/system/ldapconnection.class.php b/httpd/eclipse-php-classes/system/ldapconnection.class.php
index 033b91e9a0bba9c69c8c3c3a68ae2d8fce9fcbc9..dc348ab3ccb33c7dea37c4c550f051923a6355a5 100644
--- a/httpd/eclipse-php-classes/system/ldapconnection.class.php
+++ b/httpd/eclipse-php-classes/system/ldapconnection.class.php
@@ -464,7 +464,7 @@ class LDAPConnection {
return 0;
}
- /**
+ /**
* Retrieves all LDAP attributes for a given uid.
*
* @param string $uid
@@ -501,15 +501,8 @@ class LDAPConnection {
// Get entries from search results.
$result = ldap_get_entries($ds, $sr);
- if ($result['count'] <= 0) {
- ldap_close($ds);
- return array();
- }
-
- // Return the first entry.
- $entry = $result[0];
ldap_close($ds);
- return $entry;
+ return $result['count'] > 0 ? $result[0] : array();
}