From ec4edf84d8e3061e022dcb489366eb7e568ead6c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 2 Dec 2021 20:09:08 +0200 Subject: [PATCH] * CardDAV/ActiveDirectory: fix empty account-addressbook if sync-collection-report is used Microsoft AD can NOT filter by (modify|create)TimeStamp, we have to use when(Created|Changed) attribute --- api/src/Contacts/Ldap.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/src/Contacts/Ldap.php b/api/src/Contacts/Ldap.php index aee3b47c6c..add83ab607 100644 --- a/api/src/Contacts/Ldap.php +++ b/api/src/Contacts/Ldap.php @@ -798,6 +798,11 @@ class Ldap if (is_int($key) && preg_match('/^(contact_)?(modified|created)([<=>]+)([0-9]+)$/', $value, $matches) && ($attr = array_search($matches[2], $this->timestamps2egw))) { + // Microsoft AD can NOT filter by (modify|create)TimeStamp, we have to use when(Created|Changed) attribute + if (static::class === Ads::class) + { + $attr = $attr === 'modifytimestamp' ? 'whenChanged' : 'whenCreated'; + } $append = ''; if ($matches[3] == '>') {