Get the guest sync enabled value.

@param int $websiteId

@return bool
14640
public function isGuestSyncEnabled($websiteId = 0)
    {
        return $this->scopeConfig->isSetFlag(
            \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_SYNC_GUEST_ENABLED,
            \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE,
            $websiteId
        );
    }
560724
protected function getSitePagesResourceId($siteId)
    {
        /** @var ResourceName $resourceName */
        $resourceName = $this->getServiceLocator()->get(
            ResourceName::class
        );

        return $resourceName->get(
            ResourceName::RESOURCE_SITES,
            $siteId,
            ResourceName::RESOURCE_PAGES
        );
    }
390539
public function activeForUser($userId)
    {
        return $this->forUser($userId)->reject(function ($client) {
            return $client->revoked;
        })->values();
    }
537233
public function sync()
    {
        $enabled = $this->helper->isEnabled();
        $catalogSyncEnabled = $this->helper->isCatalogSyncEnabled();

        if (!$enabled || !$catalogSyncEnabled) {
            return 0;
        }

        $limit = $this->scopeConfig->getValue(
            \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_TRANSACTIONAL_DATA_SYNC_LIMIT
        );

        $products = $this->storeCatalogSyncer->syncByStore(
            null,
            0,
            $limit,
            'Catalog_Default'
        );

        /*
         * Sits outside of syncByStore - behaviour differs at store level.
         * At store level, we gather products from all stores first, then mark them as imported,
         * to allow for products being synced with multiple stores.
         */
        $this->catalogResource->setImportedByIds(array_keys($products));

        return count($products);
    }
1059106
private function sendContactsToAutomation($contacts, $websiteId)
    {
        $client = $this->helper->getWebsiteApiClient($websiteId);
        $data = [
            'Contacts' => $contacts,
            'ProgramId' => $this->programId,
            'AddressBooks' => [],
        ];
        //api add contact to automation enrolment
        $result = $client->postProgramsEnrolments($data);

        return $result;
    }
938811
public function setEnabled($id, $enabled = true)
    {
        if (!$user = $this->getUser($id)) {
            return false;
        }

        $user['enabled'] = (int) $enabled;

        return $this->saveUser($user);
    }
1171584
public static function getStatus($syncid) {
		if (!empty($syncid)) {
			$db = Factory::getDBO();

			$query = $db->getQuery(true)
				->select('active')
				->from('#__jfusion_sync')
				->where('syncid = ' . $db->quote($syncid));

			$db->setQuery($query);
			return (int)$db->loadResult();
		}
		return 0;
	}
766153
public function getMissingContacts($websiteId, $pageSize = 100)
    {
        $collection = $this->addFieldToFilter('contact_id', ['null' => true])
            ->addFieldToFilter('suppressed', ['null' => true])
            ->addFieldToFilter('website_id', $websiteId);

        $collection->getSelect()->limit($pageSize);

        return $collection->load();
    }
876733
public function getPushIntegrationCode($websiteID)
    {
        if (empty($websiteID)) {
            return $this->handleError('Empty website id');
        }

        $requestResult = $this->sendRequest('/push/websites/' . $websiteID . '/code');

        return $this->handleResult($requestResult);
    }
1261042
public function getRegistrationById($registrationId)
    {
        /** @var Registration $registration */
        foreach ($this->registrations as $registration) {
            if ($registration->getId() === $registrationId) {
                return $registration;
            }
        }

        return false;
    }
689551
public function fidToUserId($fid) {
        $value = Cache::redis()->hGet('fid_#_user_id', $this->host_name . '@' . $fid);
        Cache::release();
        return $value;
    }
1301551
public function getApiResponseTimeLimit($websiteId = 0)
    {
        $website = $this->storeManager->getWebsite($websiteId);
        $limit = $website->getConfig(
            \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_DEBUG_API_REQUEST_LIMIT
        );

        return $limit;
    }
1008093
public function canSeePv($gid = null)
    {
        $result = false;
        if (is_null($gid)) {
            $gid = $this->session->getCustomerGroupId();
        }
        if (!isset($this->cacheCanSeeByGid[$gid])) {
            $item = $this->daoPvCustGroup->getById($gid);
            if ($item) $result = (bool)$item->getCanSeePv();
            $this->cacheCanSeeByGid[$gid] = $result;
        } else {
            $result = $this->cacheCanSeeByGid[$gid];
        }
        return $result;
    }
1117413
public function getGuests($websiteId, $onlySubscriber = false)
    {
        $guestCollection = $this->addFieldToFilter('is_guest', ['notnull' => true])
            ->addFieldToFilter('email_imported', ['null' => true])
            ->addFieldToFilter('website_id', $websiteId);

        if ($onlySubscriber) {
            $guestCollection->addFieldToFilter('is_subscriber', 1)
                ->addFieldToFilter(
                    'subscriber_status',
                    \Magento\Newsletter\Model\Subscriber::STATUS_SUBSCRIBED
                );
        }

        return $guestCollection->load();
    }
1062244
public static function exsists($syncid) {
		if (!empty($syncid)) {
			$db = Factory::getDBO();

			$query = $db->getQuery(true)
				->select('syncid')
				->from('#__jfusion_sync')
				->where('syncid = ' . $db->quote($syncid));

			$db->setQuery($query);

			if ($db->loadResult()) {
				return true;
			}
		}
		return false;
	}
1235612
public function isEnabledForWebsite($key, $websiteId = null)
    {
        return $this->getConfigValue($key, $websiteId) === self::CONFIG_ENABLED;
    }
100947
public function isCatalogSyncEnabled($websiteId = 0)
    {
        return $this->scopeConfig->isSetFlag(
            \Dotdigitalgroup\Email\Helper\Config::XML_PATH_CONNECTOR_SYNC_CATALOG_ENABLED,
            \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE,
            $websiteId
        );
    }