Commit 807a6656 authored by Sebastian Kummer's avatar Sebastian Kummer

Merge pull request #426 in ZP/z-push from...

Merge pull request #426 in ZP/z-push from bugfix/ZP-916-koe-even-after-setting-zarafahidden to develop

* commit 'ef361bd8':
  ZP-916 Undo removal of SYSTEM check.
  ZP-916 Only define constants if they are not defined yet.
  ZP-916 Log message when account is hidden.
  ZP-916 Remove space in PR_EC_AB_HIDDEN constant name, check if value isset().
  ZP-916 Query and check for PR_EC_AB_HIDDEN.
parents baf2536f ef361bd8
...@@ -49,7 +49,12 @@ include_once('mapi/mapitags.php'); ...@@ -49,7 +49,12 @@ include_once('mapi/mapitags.php');
include_once('mapi/mapicode.php'); include_once('mapi/mapicode.php');
include_once('mapi/mapiguid.php'); include_once('mapi/mapiguid.php');
define('PR_EMS_AB_THUMBNAIL_PHOTO', mapi_prop_tag(PT_BINARY, 0x8C9E)); if (!defined('PR_EMS_AB_THUMBNAIL_PHOTO')) {
define('PR_EMS_AB_THUMBNAIL_PHOTO', mapi_prop_tag(PT_BINARY, 0x8C9E));
}
if (!defined('PR_EC_AB_HIDDEN')) {
define('PR_EC_AB_HIDDEN', mapi_prop_tag(PT_BOOLEAN, 0x67A7));
}
class Kopano extends SyncWorker { class Kopano extends SyncWorker {
const NAME = "Z-Push Kopano GAB Sync"; const NAME = "Z-Push Kopano GAB Sync";
...@@ -355,6 +360,7 @@ class Kopano extends SyncWorker { ...@@ -355,6 +360,7 @@ class Kopano extends SyncWorker {
PR_INITIALS, PR_INITIALS,
PR_LANGUAGE, PR_LANGUAGE,
PR_EMS_AB_THUMBNAIL_PHOTO, PR_EMS_AB_THUMBNAIL_PHOTO,
PR_EC_AB_HIDDEN,
PR_DISPLAY_TYPE_EX PR_DISPLAY_TYPE_EX
)); ));
foreach ($gabentries as $entry) { foreach ($gabentries as $entry) {
...@@ -362,6 +368,12 @@ class Kopano extends SyncWorker { ...@@ -362,6 +368,12 @@ class Kopano extends SyncWorker {
if (strtoupper($entry[PR_DISPLAY_NAME]) == "SYSTEM") { if (strtoupper($entry[PR_DISPLAY_NAME]) == "SYSTEM") {
continue; continue;
} }
// ignore hidden entries
if (isset($entry[PR_EC_AB_HIDDEN]) && $entry[PR_EC_AB_HIDDEN]) {
$this->Log(sprintf("Kopano->GetGAB(): Ignoring user '%s' as account is hidden", $entry[PR_ACCOUNT]));
continue;
}
$a = new GABEntry(); $a = new GABEntry();
$a->type = GABEntry::CONTACT; $a->type = GABEntry::CONTACT;
$a->memberOf = array(); $a->memberOf = array();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment