public function get(string $key = null)
	{
		if (! empty($key) && $value = dot_array_search($key, $_SESSION))
		{
			return $value;
		}
		elseif (empty($_SESSION))
		{
			return [];
		}

		if (! empty($key))
		{
			return null;
		}

		$userdata = [];
		$_exclude = array_merge(
			['__ci_vars'], $this->getFlashKeys(), $this->getTempKeys()
		);

		$keys = array_keys($_SESSION);
		foreach ($keys as $key)
		{
			if (! in_array($key, $_exclude, true))
			{
				$userdata[$key] = $_SESSION[$key];
			}
		}

		return $userdata;
	}