From 2d5eae0cb20977468c36928f3e47638be4b9ff73 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 22 Aug 2009 07:31:53 +0000 Subject: [PATCH] Patch from Jean-Charles Passard : allows to use either uid or id to retrieve contacts --- addressbook/inc/class.addressbook_ldap.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_ldap.inc.php b/addressbook/inc/class.addressbook_ldap.inc.php index fff1a49a34..bd2c33bb98 100644 --- a/addressbook/inc/class.addressbook_ldap.inc.php +++ b/addressbook/inc/class.addressbook_ldap.inc.php @@ -290,7 +290,8 @@ class addressbook_ldap } else { - $contact_id = ldap::quote(is_array($contact_id) ? $contact_id['id'] : $contact_id); + $contact_id = ldap::quote(!is_array($contact_id) ? $contact_id : + (isset ($contact_id['id']) ? $contact_id['id'] : $contact_id['uid'])); $filter = "(|(entryUUID=$contact_id)(uid=$contact_id))"; } $rows = $this->_searchLDAP($GLOBALS['egw_info']['server']['ldap_contact_context'],