Lets check if there are any manipulators active for showing the post
328220
protected function saveMutator($postTypeModel, $key, $value, $post, $postmeta, $request = [])
	{
		$post = $post->toArray();
		$postmeta = $postmeta;
		$postRequest = array_merge($post, $postmeta);

		// Receiving the custom field
		$customField = $this->getCustomFieldObject($postTypeModel, $key);

		if(!empty($customField)){

			// Lets see if we have a mutator registered
			if(array_has($customField, 'mutator') && !empty($customField['mutator'])){

				if(method_exists(new $customField['mutator'], 'in')){
					$mutatorValue = (new $customField['mutator'])->in($customField, $postRequest, $value, $key, $postTypeModel, $request);

					// Lets set the new value to the existing value
					$value = $mutatorValue;
				}

			}

		}

		return $value;
	}
1120672
public function __isAllowed()
    {
        if ($this->checkAuthentication !== true) {
            // this controller is not responsible for the authentication
            return false;
        }

        $this->typo3Loader->initializeBackendEndUser();

        $beUser = $this->typo3Loader->getBackEndUser();
        if (false === is_array($beUser->user) || empty($beUser->user['uid'])) {
            return false;
        }
        return true;
    }
406403
def is_active(self):
    """"""
    if not self._multiplexer:
      return False
    return bool(self._multiplexer.PluginRunToTagToContent(metadata.PLUGIN_NAME))
172186
protected function checkIfBot() {
    if($this->nodb) {
      return;
    }

    // BLP 2018-07-02 -- replace old logic with 'isMe()'
    if($this->isMe()) {
      return;
    }

    $this->query("select count(*) from information_schema.tables ".
                 "where (table_schema = '$this->masterdb') and (table_name = 'bots')");

    list($ok) = $this->fetchrow('num');

    if($ok == 1) {
      $agent = $this->escape($this->agent);

      $this->isBot = preg_match("~\+*https?://|Googlebot-Image|python|java|wget|nutch|perl|libwww|lwp-trivial|curl|PHP/|urllib|".
                                "GT::WWW|Snoopy|MFC_Tear_Sample|HTTP::Lite|PHPCrawl|URI::Fetch|Zend_Http_Client|".
                                "http client|PECL::HTTP~i", $this->agent)
                     || ($this->query("select ip from $this->masterdb.bots where ip='$this->ip'")) ? true : false;          
    }
  }
173641
function checkPostOrPutOrPatchRequest(req, res, cb) {
            var _keys;
            var _reqElement;

            if (req.body) {
                _keys = Object.keys(req.body);
                _keys.forEach(function (keyElement) {
                    _reqElement = req.body[keyElement];
                    //console.log(/" [a-z]*="/i.spec(_reqElement));
                    _patterns.forEach(function (pattern) {
                        if (pattern.test(_reqElement) && _blocker.blockHost) {
                            _config.attack.handle(req, res);
                        }
                    });
                });
            }
            if (cb) {
                cb();
            }
        }
907229
public function seen()
    {
        $this->post_seen = self::POST_SEEN;
        if (!$this->save()) {
            return false;
        }
        Podium::getInstance()->podiumCache->deleteElement('user.subscriptions', User::loggedId());
        return true;
    }
933339
def _set_trusted_option_if_needed(repostr, trusted):
    '''
    
    '''
    if trusted is True:
        repostr += ' [trusted=yes]'
    elif trusted is False:
        repostr += ' [trusted=no]'
    return repostr
1098096
def is_active(self):
        """"""
        if self._queue.exhausted:
            return False
        return any(ch.is_active for ch in self._refs.values())
122593
public function markPostponed(): bool
    {
        $this->owner->{$this->statusAttribute} = Status::POSTPONED;

        if ($this->beforeModeration()) {
            return $this->owner->save();
        }

        return false;
    }
1124634
public function index()
    {
        if (!isLoggedIn()) {
            unauthorised();
        }

        $oInput     = Factory::service('Input');
        $oEncrypt   = Factory::service('Encrypt');
        $oEmailer   = Factory::service('Emailer', 'nails/module-email');
        $oUserModel = Factory::model('User', 'nails/module-auth');

        $sToken = $oInput->get('token');
        $aToken = $oEncrypt->decode($sToken, APP_PRIVATE_KEY);

        if (!$aToken) {
            show404();
        }

        $aToken = explode('|', $aToken);

        if (count($aToken) != 3) {
            show404();
        }

        $oUser = $oUserModel->getById($aToken[2]);
        if (!$oUser || $oUser->id != activeUser('id ')) {
            show404();
        }

        $oEmail = $oEmailer->getByRef($aToken[1]);

        if (!$oEmail || empty($oEmail->type->isUnsubscribable)) {
            show404();
        }

        // --------------------------------------------------------------------------

        //  All seems above board, action the request
        if ($oInput->get('undo')) {
            if ($oEmailer->userHasUnsubscribed(activeUser('id'), $aToken[0])) {
                $oEmailer->subscribeUser(activeUser('id'), $aToken[0]);
            }
        } else {
            if (!$oEmailer->userHasUnsubscribed(activeUser('id'), $aToken[0])) {
                $oEmailer->unsubscribeUser(activeUser('id'), $aToken[0]);
            }
        }

        //  Load views
        $oView = Factory::service('View');
        $oView->load('email/utilities/unsubscribe', $this->data);
    }
290151
public function isActive()
    {
        if ($this->inactive()) {
            return false;
        }

        $active = $this->getActiveAttribute();

        if (is_bool($active)) {
            return $active;
        }

        if ($active instanceof \Closure) {
            return call_user_func($active);
        }

        if ($this->hasRoute()) {
            return $this->getActiveStateFromRoute();
        }

        return $this->getActiveStateFromUrl();
    }
252675
def has_comment_access(post_id, comment_id)
      comment = Unsakini::Comment.where(id: comment_id, post_id: post_id, user_id: @user.id).first
      if comment.nil?
        return {status: :forbidden, comment: comment}
      else
        return {status: :ok, comment: comment}
      end
    end
1002421
function verify(postedMessage) {
		if (
			// Check incoming message is valid
			typeof postedMessage === 'object' &&
			typeof postedMessage.uuid === 'string' &&
			postedMessage._respondable === true
		) {
			var messageSource = _getSource();
			return (
				// Check the version matches
				postedMessage._source === messageSource ||
				// Allow free communication with axe test
				postedMessage._source === 'axeAPI.x.y.z' ||
				messageSource === 'axeAPI.x.y.z'
			);
		}
		return false;
	}
740661
function (target_id) {
            if ( ! target_id) { return false; }
            for (var i = 0; i < this._disabledInputs.length; i++) {
                if (this._disabledInputs[i] == target_id) { return true; }
            }
            return false;
        }
1124603
function hasPost($name = null) {
        if ($name){
            return isset($this->post[$name]);
        }else{
            return count($this->post) > 0;
        }
    }
1316598
protected function isSubmitComplete() {
    if (!isset($_POST['submit'])) {
      return false;
    }
    foreach ($this->getInputParameters() as $parameter) {
      if ($parameter['required'] &&
          empty($_POST[$parameter['name']])) {
        return false;
      }
    }
    return true;
  }
980510
def perform_permissions_check(self, user, obj, perms):
        
        return self.request.forum_permission_handler.can_edit_post(obj, user)