summaryrefslogtreecommitdiff
path: root/lib/Kolab/CardDAV/ContactsBackend.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Kolab/CardDAV/ContactsBackend.php')
-rw-r--r--lib/Kolab/CardDAV/ContactsBackend.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Kolab/CardDAV/ContactsBackend.php b/lib/Kolab/CardDAV/ContactsBackend.php
index 5ce2be7..b9f0ff8 100644
--- a/lib/Kolab/CardDAV/ContactsBackend.php
+++ b/lib/Kolab/CardDAV/ContactsBackend.php
@@ -39,6 +39,8 @@ use Kolab\Utils\VObjectUtils;
*/
class ContactsBackend extends CardDAV\Backend\AbstractBackend
{
+ public $ldap_directory;
+
private $sources;
private $folders;
private $aliases;
@@ -303,6 +305,12 @@ class ContactsBackend extends CardDAV\Backend\AbstractBackend
if ($addressBookId == '__all__') {
$contact = $this->get_card_by_uid($uid, $storage);
}
+ // read card data from LDAP directory
+ else if ($addressBookId == LDAPDirectory::DIRECTORY_NAME) {
+ if (is_object($this->ldap_directory)) {
+ $contact = $this->ldap_directory->getContactObject($uid);
+ }
+ }
else {
$storage = $this->get_storage_folder($addressBookId);
$contact = $storage->get_object($uid, '*');