@param string $member optional member to check.

@return bool
494554
public function hasStaticMember($member)
    {
        if (is_string($this->$member)) {
            $tokens = token_get_all('<?php '.$this->$member);

            return
                count($tokens) === 2 &&
                is_array($tokens[1]) &&
                in_array($tokens[1][0], [T_CONSTANT_ENCAPSED_STRING, T_DNUMBER, T_LNUMBER]);
        }

        return false;
    }
1168987
public function isAuthor($member = null)
    {
        if (!$member || !$member->exists()) {
            return false;
        }

        $list = $this->Authors();

        if ($list instanceof UnsavedRelationList) {
            return in_array($member->ID, $list->getIDList());
        }

        return $list->byID($member->ID) !== null;
    }
1004685
public function canPublish($member = null)
    {
        if (!$member) {
            $member = Security::getCurrentUser();
        }
        // Check all explicitly added items
        foreach ($this->Changes()->filter(['Added' => ChangeSetItem::EXPLICITLY]) as $change) {
            /** @var ChangeSetItem $change */
            if (!$change->canPublish($member)) {
                return false;
            }
        }

        return true;
    }
1185447
public function canEdit($member)
    {
        // Override any default behaviour, to allow queuedjobs to complete
        if ($this->isPublishJobRunning()) {
            return true;
        }

        if ($active = $this->getWorkflowInstance()) {
            return $active->canEditTarget();
        }
    }
958491
public function remove( $member )
    {
        if( false !== $key = array_search( $member, $this->members, true ) ) {
            unset( $this->members[$key] );
        }
        return $this;
    }
438409
public function getFieldValue(string $member)
        {
        	$score = $this->_redis->zscore($this->_key, $member);
                return $score!==null ? $score: 0;
        }
833688
public function canView($member = null)
    {
        $extended = $this->extendedCan(__FUNCTION__, $member);

        if ($extended !== null) {
            return $extended;
        }

        if ($this->Parent()) {
            return $this->Parent()->canView($member);
        }

        return parent::canView($member);
    }
1316641
protected function isMemberOf($member, $relation)
    {
        if (!$member || !$member->exists()) {
            return false;
        }

        if ($relation instanceof UnsavedRelationList) {
            return in_array($member->ID, $relation->getIDList());
        }

        return $relation->byID($member->ID) !== null;
    }
481323
public function canEditAuthors($member = null)
    {
        $member = $this->getMember($member);

        $extended = $this->extendedCan('canEditAuthors', $member);

        if ($extended !== null) {
            return $extended;
        }

        $parent = $this->Parent();

        if ($parent instanceof Blog && $parent->exists()) {
            if ($parent->isEditor($member)) {
                return true;
            }

            if ($parent->isWriter($member) && $this->isAuthor($member)) {
                return true;
            }
        }

        return Permission::checkMember($member, Blog::MANAGE_USERS);
    }
1327392
public function isUnreadByUser($member = null) {
		if (!$member) {
			$member = $this->securityContext->getMember();
		}

		if ($member && $member->ID) {
			return strtotime($this->Created) > strtotime($member->LastPostView);
		}
	}
1098335
public function canPostComment($member = null)
    {
        // Deny if not enabled for this object
        if (!$this->owner->CommentsEnabled) {
            return false;
        }

        if (!$this->owner->canView($member)) {
            // deny if current user cannot view the underlying record.
            return false;
        }

        // Check if member is required
        $requireLogin = $this->owner->CommentsRequireLogin;
        if (!$requireLogin) {
            return true;
        }

        // Check member is logged in
        $member = $member ?: Security::getCurrentUser();
        if (!$member) {
            return false;
        }

        // If member required check permissions
        $requiredPermission = $this->owner->PostingRequiredPermission;
        if ($requiredPermission && !Permission::checkMember($member, $requiredPermission)) {
            return false;
        }

        return true;
    }
84218
public function canDelete($member=null) {
        $parentResult=parent::canDelete($member);
        
        if($parentResult==false || $this->UserLanguage==false) {
            return false;
        }
        
        if($this->Folders()->count()>0 || $this->Snippets()->count()>0) {
            return false;
        }
        
        return true;
    }
1210447
public function canView($member = null)
    {
        if (parent::canView($member)) {
            return true;
        }

        if (Subsite::all_accessible_sites()->count() > 0) {
            return true;
        }

        return false;
    }
347046
public function canModerateComments($member = null)
    {
        // Deny if not enabled for this object
        if (!$this->owner->CommentsEnabled) {
            return false;
        }

        // Fallback to can-edit
        return $this->owner->canEdit($member);
    }
1249701
public function isEditor($member)
    {
        $isEditor = $this->isMemberOf($member, $this->Editors());
        $this->extend('updateIsEditor', $isEditor, $member);

        return $isEditor;
    }
943463
public function canTranslate($member, $locale)
    {
        if ($locale && !i18n::validate_locale($locale)) {
            throw new InvalidArgumentException(sprintf('Invalid locale "%s"', $locale));
        }

        if (!$member || !(is_a($member, 'Member')) || is_numeric($member)) {
            $member = Member::currentUser();
        }

        // Always allow on cli and for non-logged users in dev mode
        if ((!$member && Director::isDev()) || Director::is_cli())
            return true;

        // check for locale
        $allowedLocale = (
            !is_array(Translatable::get_allowed_locales())
            || in_array($locale, Translatable::get_allowed_locales())
        );

        if (!$allowedLocale) {
            return false;
        }

        // By default, anyone who can edit a page can edit the default locale
        if ($locale == Translatable::default_locale()) {
            return true;
        }

        // check for generic translation permission
        if (Permission::checkMember($member, 'TRANSLATE_ALL')) {
            return true;
        }

        // check for locale specific translate permission
        return Permission::checkMember($member, 'TRANSLATE_' . $locale) == true;
    }
120261
public function existsField(string $member) : bool
        {
                return $this->_redis->zscore($this->_key, $member)===null ? false : true;
        }