Commit ca33d2c5 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1370 isZPushEnabled flag always needs to be checked on the main

store.

Released under the Affero GNU General Public License (AGPL) version 3.
parent fe3ebd3e
...@@ -2566,7 +2566,9 @@ class BackendKopano implements IBackend, ISearchProvider { ...@@ -2566,7 +2566,9 @@ class BackendKopano implements IBackend, ISearchProvider {
*/ */
private function isZPushEnabled() { private function isZPushEnabled() {
$addressbook = $this->getAddressbook(); $addressbook = $this->getAddressbook();
$userEntryid = mapi_getprops($this->store, array(PR_MAILBOX_OWNER_ENTRYID)); // this check needs to be performed on the store of the main (authenticated) user
$store = $this->storeCache[$this->mainUser];
$userEntryid = mapi_getprops($store, array(PR_MAILBOX_OWNER_ENTRYID));
$mailuser = mapi_ab_openentry($addressbook, $userEntryid[PR_MAILBOX_OWNER_ENTRYID]); $mailuser = mapi_ab_openentry($addressbook, $userEntryid[PR_MAILBOX_OWNER_ENTRYID]);
$enabledFeatures = mapi_getprops($mailuser, array(PR_EC_DISABLED_FEATURES)); $enabledFeatures = mapi_getprops($mailuser, array(PR_EC_DISABLED_FEATURES));
if (isset($enabledFeatures[PR_EC_DISABLED_FEATURES]) && is_array($enabledFeatures[PR_EC_DISABLED_FEATURES])) { if (isset($enabledFeatures[PR_EC_DISABLED_FEATURES]) && is_array($enabledFeatures[PR_EC_DISABLED_FEATURES])) {
......
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