Return whether the person's is subsribed or not.

@param ComPeopleDomainEntityPerson $person Subscriber

@return bool
501654
public function subscribed($subscriber)
    {
        if ($subscriber->id && $this->subscriberIds->offsetExists($subscriber->id)) {
            return true;
        }

        return false;
    }
1322616
public function isOwner(User $user)
    {
        $owner = $this->getOwner();
        if ($owner !== null && $user->getId() === $owner->getUser()->getId()) {
            return true;
        }

        return false;
    }
918631
protected function authRoles(UserInterface $user)
    {
        if (empty($this->roles)) {
            return true;
        }

        foreach ($this->roles as $role) {
            if ($user->hasRole($role)) {
                return true;
            }
        }

        return false;
    }
97008
public static function isSuperUser($user = ''){
		$superUser = self::getSuperUserConfig();
		if(!$user){
			$user = self::getCurrentUsername();
		}
		if($user && in_array($user,$superUser)){
			return true;
		}
		return false;
	}
341867
private function checkAllSubscribersAreStatic(array $subscribers): bool
    {
        $result = true;
        foreach ($subscribers as $eventName => $callableList) {
            if (is_string($eventName) === false || is_array($callableList) === false) {
                $result = false;
                break;
            }
            foreach ($callableList as $mightBeCallable) {
                $method = $this->parseStaticMethod($mightBeCallable);
                if ($method === null || $method->isStatic() === false) {
                    $result = false;
                    break;
                }
            }
        }

        return $result;
    }
1279211
def is_subscribed(self):
		""""""

		subscribed = next(
			(
				config_item['value'] == 'true'
				for config_item in self.config()
				if config_item['key'] == 'isNautilusUser'
			),
			None
		)

		if subscribed:
			self.tier = 'aa'
		else:
			self.tier = 'fr'

		return subscribed
1259178
public function isSuperadmin($user_id = null)
    {
        if (isset($user_id)) {
            return $this->getSuperadminId() == $user_id;
        }

        return $this->getSuperadminId() == $this->uid;
    }
412871
static public function isSubscriptionType($subscriptionType) {
    return ((string) $subscriptionType == Connect2PayClient::SUBSCRIPTION_TYPE_NORMAL ||
        (string) $subscriptionType == Connect2PayClient::SUBSCRIPTION_TYPE_INFINITE ||
        (string) $subscriptionType == Connect2PayClient::SUBSCRIPTION_TYPE_ONETIME ||
        (string) $subscriptionType == Connect2PayClient::SUBSCRIPTION_TYPE_LIFETIME);
  }
88891
public function subscribed($subscription = 'default', $planId = null)
    {
        $subscription = $this->subscription($subscription);

        if (is_null($subscription)) {
            return false;
        }

        if (is_null($planId)) {
            return $subscription->isActive();
        }

        if ($planId == $subscription->plan_id and $subscription->isActive()) {
            return true;
        }

        return false;
    }
539290
public function isAnswerAllowed(UserInterface $user, $answer)
    {
        $answerEntity = $this->getEntityManagerAnswer()->getAnswer4UserId($user->getId());

        if (!$answerEntity) {
            return true;
        }

        // @TODO better workflow, with ZendFilter
        $realAnswer = strtolower(trim($answerEntity->getAnswer()));
        $plainAnswer = strtolower(trim($answer));

        return $realAnswer === $plainAnswer;
    }
367042
public function admitUser(UserInterface $user)
    {
        $this->currentUser = $user;
        $this->session->set($user->getId());
        return true;
    }
1172361
protected function checkThisIsSubsetOf(IType $type) : bool
    {
        $class = get_called_class();
        if ($type instanceof $class) {
            /** @var static $type */
            return $this->elementType->isSubsetOf($type->elementType);
        }

        return parent::checkThisIsSubsetOf($type);
    }
313429
private function handleConfirmation($subscriber, $type)
    {
        $storeId = $subscriber->getStoreId();
        try {
            $websiteId = $this->storeManager->getStore($storeId)->getWebsiteId();
        } catch (\Exception $e) {
            return false;
        }

        if (!$this->configReader->isEnabledForWebsite(ConfigInterface::MARKETING_EVENTS, $websiteId)) {
            return false;
        }

        try {
            $this->saveEvent(
                $websiteId,
                $storeId,
                $type,
                $subscriber->getId(),
                $this->getDataFromSubscription($subscriber)
            );
        } catch (\Exception $e) {
            return false;
        }

        return true;
    }
536456
public function can_subscribe_to_forum(stdClass $user) : bool {
        if ($this->forum->get_type() == 'single') {
            return false;
        }

        return !is_guest($this->get_context(), $user) &&
            subscriptions::is_subscribable($this->get_forum_record());
    }
1362281
public function getSpouseById(\Fisharebest\Webtrees\Individual $person) {
		if ($this->gedcomrecord->getWife() && 
				$person->getXref() === $this->gedcomrecord->getWife()->getXref()) {
			return $this->gedcomrecord->getHusband();
		} else {
			return $this->gedcomrecord->getWife();
		}
	}
1039176
protected function isUserExcluded(\core_kernel_classes_Resource $delivery, User $user){
        $excludedUsers = $delivery->getPropertyValues(new \core_kernel_classes_Property(DeliveryContainerService::PROPERTY_EXCLUDED_SUBJECTS));
        return in_array($user->getIdentifier(), $excludedUsers);
    }
269783
protected function isGrantedOr403Error(UserInterface $user)
    {
        /** @var \SymfonyId\AdminBundle\Security\AuthorizationChecker $authorizationChecker */
        $authorizationChecker = $this->container->get('symfonyid.admin.security.authorization_checker');

        return $authorizationChecker->isValidUserOr403Error($user);
    }