retrieves the session id from the request if any

@return string|null
160507
protected function getSidFromRequest()
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        $sid = null;

        $sForceSidParam = $myConfig->getRequestParameter($this->getForcedName());
        $sSidParam = $myConfig->getRequestParameter($this->getName());

        //forcing sid for SSL<->nonSSL transitions
        if ($sForceSidParam) {
            $sid = $sForceSidParam;
        } elseif ($this->_getSessionUseCookies() && $this->_getCookieSid()) {
            $sid = $this->_getCookieSid();
        } elseif ($sSidParam) {
            $sid = $sSidParam;
        }

        return $sid;
    }
1023542
public static function loggedId()
    {
        if (Podium::getInstance()->user->isGuest) {
            return null;
        }
        if (Podium::getInstance()->userComponent !== true) {
            $user = static::findMe();
            if (empty($user)) {
                return null;
            }
            return $user->id;
        }
        return Podium::getInstance()->user->id;
    }
443436
public function getUserId()
	{
		if ($this->session_machine === null) {
			throw new RuntimeException('Session machine not ready ‒ '.__METHOD__.' called too soon.');
		}
		return $this->session_machine->state !== '' ? $this->session_machine[$this->user_id_property] : null;
	}
1304187
public String getSessionId(HttpServletRequest request) {
		String sessionId = request.getParameter(ACCESSTOKEN);
		if(isBlank(sessionId)){
			sessionId = request.getHeader(ACCESSTOKEN);
		}
		if(isBlank(sessionId)){
			Cookie[] cookies = request.getCookies();
			if(cookies == null)return null;
			for (Cookie cookie : cookies) {
				if(sessionIdName.equals(cookie.getName())){
					sessionId = cookie.getValue();
					break;
				}
			}
		}
		return sessionId;
	}
219861
public function id()
    {
        // just return any string since the Cookie storage has no idea.
        if ($this instanceof \Pimf\Session\Storages\Cookie) {
            return Character::random(40);
        }

        // we'll find an random ID here.
        do {
            $session = $this->load($key = Character::random(40));
        } while ($session !== null);

        return $key;
    }
15864
public function getUserId()
    {
        if (
            \Yii::$app !== null
            && \Yii::$app->has('user', true)
            && \Yii::$app->getUser() !== null
        ) {
            $user = \Yii::$app->getUser()->getIdentity(false);
            if ($user !== null) {
                return $user->getId();
            }
        }
        return null;
    }
1130293
public function getId()
    {
        if (!self::$session) {
            Exception::i()->setMessage(self::ERROR_NOT_STARTED)->trigger();
        }

        return session_id();
    }
898658
public function getCurrentRequestId()
    {
        if ($this->requestId === null) {
            $this->requestId = $this->getRequestIdGenerator()->generate();
        }
        return $this->requestId;
    }
163327
function getUserFromPHPSession() {
		if ($this->user == null) {
            $sid = $this->request->session('usersid', '');
            if ($sid == '') {
                // try with a get key
                $sid = $this->request->get('sessionid', '');
            }
			$this->user = $this->getUserFromSession($sid);
		}
        return $this->user;
    }
1355704
private function getSession()
    {
        $vars = array(
            'method' => 'auth.getSession',
            'api_key' => $this->apiKey,
            'token' => $this->token
        );
        $sig = $this->apiSig($this->apiSecret, $vars);
        $vars['api_sig'] = $sig;

        if ($call = $this->apiGetCall($vars)) {
            $this->username = (string) $call->session->name;
            $this->sessionKey = (string) $call->session->key;
            $this->subscriber = (string) $call->session->subscriber;
        } else {
            return false;
        }
    }
217321
function getSessionId(cookie) {
		if (typeof(cookie.cookies) === 'string') {
			var idx = cookie.cookies.indexOf('=');
			if (idx !== -1) {
				return _.trim(cookie.cookies.substring(idx + 1), '"') || null;
			}
		}
		return null;
	}
48033
public function getSession() {
    if (!$this->sessionLoaded) {
      $session = null;
      $write_cookie = true;

      // try loading session from signed_request in $_REQUEST
      $signedRequest = $this->getSignedRequest();
      if ($signedRequest) {
        // sig is good, use the signedRequest
        $session = $this->createSessionFromSignedRequest($signedRequest);
      }

      // try loading session from $_REQUEST
      if (!$session && isset($_REQUEST['session'])) {
        $session = json_decode(
          get_magic_quotes_gpc()
            ? stripslashes($_REQUEST['session'])
            : $_REQUEST['session'],
          true
        );
        $session = $this->validateSessionObject($session);
      }

      // try loading session from cookie if necessary
      if (!$session && $this->useCookieSupport()) {
        $cookieName = $this->getSessionCookieName();
        if (isset($_COOKIE[$cookieName])) {
          $session = array();
          parse_str(trim(
            get_magic_quotes_gpc()
              ? stripslashes($_COOKIE[$cookieName])
              : $_COOKIE[$cookieName],
            '"'
          ), $session);
          $session = $this->validateSessionObject($session);
          // write only if we need to delete a invalid session cookie
          $write_cookie = empty($session);
        }
      }

      $this->setSession($session, $write_cookie);
    }

    return $this->session;
  }
283380
static public function getID(): string
    {
        if (!isset(self::$cache['id'])) {
            $cookies = Internal\Cookies::getList(Internal\Cookies::TYPE_SERVER);
            self::$cache['id'] = isset($cookies['tmpr']) ? $cookies['tmpr'] : Internal\Themes::getActiveThemeID();
        }
        return self::$cache['id'];
    }
219719
protected static function _getUserId()
    {
        if (is_null(self::$_userID)) {
            self::$_userID = null;
            if (isset(Yii::$app->user) and !empty(Yii::$app->user->id)) {
                self::$_userID = Yii::$app->user->id;
            }
        }

        return self::$_userID;
    }
72229
public function getSession() {
        if ($this->debug) { $start = microtime(true); }
        if (!$this->sessionLoaded) {
            $session = null;
            $write_cookie = true;

            $parsed_url = parse_url($this->redirect_uri);
            $parsed_path = '/';
            if (!empty($parsed_url['path'])) {
                $parsed_path = ($parsed_url['path'] != '/')?rtrim($parsed_url['path'], '/'):'/';
            }
            $request_uri = $this->_getServerParam('REQUEST_URI');
            $code = $this->_getRequestParam('code');
            if (!$session && stristr($request_uri,$parsed_path) && $code) {
                $ret = $this->getAccessToken($code);
                if (is_array($ret) && isset($ret['access_token'])) {
                    $session = $this->signSession($ret); // Signs session for security
                }
            }
            // try loading session from signed_request in $_REQUEST
            $signedRequest = $this->getSignedRequest();
            if ($signedRequest) {
                // sig is good, use the signedRequest
                $session = $this->createSessionFromSignedRequest($signedRequest);
            }
            // try loading session from $_REQUEST
            $session_param = $this->_getRequestParam('session');
            if (!$session && $session_param) {
                $session = json_decode(get_magic_quotes_gpc() ? stripslashes($session_param) : $session_param, true);
                $session = $this->validateSessionObject($session);
            }
            // try loading session from cookie if necessary
            if (!$session && $this->useCookieSupport()) {
                $cookieName = $this->getSessionCookieName();
                if (isset($_COOKIE[$cookieName])) {
                    $session = array();
                    parse_str(trim(get_magic_quotes_gpc() ? stripslashes($_COOKIE[$cookieName]) : $_COOKIE[$cookieName], '"'), $session);
                    $session = $this->validateSessionObject($session);
                    // write only if we need to delete a invalid session cookie
                    $write_cookie = empty($session);
                }
            }
            $this->setSession($session, $write_cookie);
        }
        if ($this->debug) { $this->timer[__FUNCTION__]['elapsed'][] = microtime(true)-$start; }
        return $this->session;
    }
536080
public function getId()
    {
        if (is_null($this->_id)) {
            $this->_id = md5(serialize($this->instructions));
        }

        return $this->_id;
    }
586119
public function sessionID($id = null)
    {
        $current = Arr::get($_COOKIE, HttpCache::$sessionName, '');

        if ($id === null)
        {
            return $current;
        }

        $this->setCookie(HttpCache::$sessionName, $id
            , ini_get('session.cookie_lifetime')
            , ini_get('session.cookie_path')
            , ini_get('session.cookie_domain')
            , ini_get('session.cookie_secure')
            , ini_get('session.cookie_httponly'));
        $_COOKIE[HttpCache::$sessionName] = $id;
        return $current;
    }