classes/BearCMS/CurrentUser.php
public function getID(): ?string
    {
        $sessionKey = $this->getSessionKey();
        if (strlen($sessionKey) === 0) {
            return null;
        }
        $cacheKey = 'id-' . $sessionKey;
        if (!isset(self::$cache[$cacheKey])) {
            self::$cache[$cacheKey] = null;
            $data = Internal\Data::getValue('.temp/bearcms/userkeys/' . md5($sessionKey));
            if ($data !== null) {
                self::$cache[$cacheKey] = $data;
            }
        }
        return self::$cache[$cacheKey];
    }
public function getID(): ?string
    {
        $sessionKey = $this->getSessionKey();
        if (strlen($sessionKey) === 0) {
            return null;
        }
        $cacheKey = 'id-' . $sessionKey;
        if (!isset(self::$cache[$cacheKey])) {
            self::$cache[$cacheKey] = null;
            $data = Internal\Data::getValue('.temp/bearcms/userkeys/' . md5($sessionKey));
            if ($data !== null) {
                self::$cache[$cacheKey] = $data;
            }
        }
        return self::$cache[$cacheKey];
    }
public function getID ( ) : ? string { $ sessionKey = $ this -> getSessionKey ( ) ; if ( strlen ( $ sessionKey ) === 0 ) { return null ; } $ cacheKey = 'id-' . $ sessionKey ; if ( ! isset ( self :: $ cache [ $ cacheKey ] ) ) { self :: $ cache [ $ cacheKey ] = null ; $ data = Internal \ Data :: getValue ( '.temp/bearcms/userkeys/' . md5 ( $ sessionKey ) ) ; if ( $ data !== null ) { self :: $ cache [ $ cacheKey ] = $ data ; } } return self :: $ cache [ $ cacheKey ] ; }
Returns the current logged in user ID

@return string|null ID of the current logged in user or null
Returns the current logged in user ID