- if (($this->session->getLocalUserId() || $this->config->get('system', 'community_page_style') != Community::DISABLED_VISITOR) &&
- !($this->config->get('system', 'community_page_style') == Community::DISABLED)) {
+ if (Feature::isEnabled($this->session->getLocalUserId(), Feature::COMMUNITY) && (($this->session->getLocalUserId() || $this->config->get('system', 'community_page_style') != Community::DISABLED_VISITOR) &&
+ !($this->config->get('system', 'community_page_style') == Community::DISABLED))) {