Checks whether a key in fe_user session exists

@param string $key
@param string $type - possible values: ses|user
@return boolean
356330
public static function has($key, $type = 'ses')
    {
        return ($GLOBALS['TSFE']->fe_user->getKey(self::isType($type), $key)) ? true : false;
    }
893860
public function has(Request $request, string $key): bool
    {
        $exists = $this->getSession($request)->has($key);

        $this->logger->info('session: has key {key}, exists {exists}', ['key' => $key, 'exists' => $exists]);

        return $exists;
    }
679015
protected function get($key)
    {
        return $this->getFrontEndController()->fe_user->getKey(self::$types[$this->type], $key);
    }
857542
public function has($key, $type)
	{
		if(is_array($key))
		{
			return $this->hasItem($this->storageKey($key), $type);
		}

		if(is_string($key))
		{
			return $this->hasItem($key, $type);
		}

		if(is_int($key))
		{
			return $this->hasItem($this->storageKey([$key]), $type);
		}

		return false;
	}
964085
public function exists($key)
    {
        if (null === $this->configs) {
            $this->loadConfigs();
        }

        return array_key_exists($key, $this->configs);
    }
1371999
public static function get($key, $type = 'ses')
    {
        $sessionData = $GLOBALS['TSFE']->fe_user->getKey(self::isType($type), $key);

        return unserialize($sessionData);
    }
640829
public function hasMessages($type = null)
    {
        if ( ! is_null($type)) {
            return ! empty($_SESSION[$this->key][$type]);
        }
        
        foreach ($this->types as $type) {
            if ( ! empty($_SESSION[$this->key][$type])) {
                return true;
            }
        }

        return false;
    }
931692
public function getLastToken($type, $key = 'type')
    {
        return $this->token()->orderBy('tokens.created_at', 'desc')->where($key, $type)->first();
    }
1132382
public static function has($data, $key)
    {
        if (self::isArrayAccess($data)) {
            return array_key_exists($key, $data);
        }
        if (!is_object($data)) {
            return false;
        }
        if (method_exists($data, 'get' . $key)) {
            return true;
        }
        if (method_exists($data, 'get' . str_replace('_', '', $key))) {
            return true;
        }
        if (isset($data->$key)) {
            return true;
        }

        return false;
    }
684459
public function exists($key) {
		return isset($this->_data[$key]) || isset($this->registered[$key]);
	}
213703
protected function hasItem($key, $type)
	{
		if(array_key_exists($type, $this->storage) && array_key_exists($key, $this->storage[$type]))
		{
			return true;
		}

		return false;
	}
475375
public function isAssignableFrom(Type $type)
    {
        if (!$type instanceof ArrayType)
            return false;
        if (!$type->itemType->equals($this->itemType))
            return false;
        if (!$type->keyType->equals($this->keyType))
            return false;
        
        return true;
    }
215106
public function exists($key)
	{
		$this->connect();
		
		$key = $this->formatKey($key);
		
		return (bool) $this->driver->get($key);
	}
1088173
public function has($key)
    {
        $keys = (func_num_args() > 1) ? func_get_args() : (array) $key;

        foreach ($keys as $key) {
            if(!array_key_exists($key, $_SESSION))
                return false;
        }

        return true;
    }
422402
public function has($key, $type = Validator::EXISTS)
    {
        $args = WF::flatten_array(func_get_args());

        $last = end($args);     
        $type = Validator::EXISTS;
        if ((is_string($last) && defined(Type::class . '::' . $last)) || $last instanceof Validator)
            $type = array_pop($args);

        foreach ($args as $arg)
            if (!is_scalar($arg))
                throw new \InvalidArgumentException("Keys must be scalar, not: " . WF::str($arg));

        $val = $this->values;
        foreach ($args as $arg)
        {
            if (!WF::is_array_like($val) || !isset($val[$arg]))
                return false;
            $val = $val[$arg];
        }

        // Check type
        if (is_string($type))
        {
            $unstrict = in_array($type, [Type::INT, Type::FLOAT, Type::BOOL]);
            $checker = new Validator($type, ['unstrict' => $unstrict]);
        }
        else
            $checker = $type;

        return $checker->validate($val);
    }
21708
public function hasConfig(string $key)
    {
        $redis = $this->getDI()->getRedis();
        $hashKey = $this->getNotificationKey(); //'user_notifications_'.$this->user_id;

        return $redis->hGet($hashKey, $key);
    }
300714
public function hasKey($key)
    {
        if ($this->started !== true) {
            throw new Exception\SessionNotStartedException('Tried to check a session data entry, but the session has not been started yet.', 1352488661);
        }
        return $this->storageCache->has($this->storageIdentifier . md5($key));
    }