lib/ASM/Redis/RedisDriver.php
function openSessionByID($sessionId, SessionManager $sessionManager, $userProfile = null)
    {
        $sessionId = (string)$sessionId;

        $lockToken = $this->acquireLockIfRequired($sessionId, $sessionManager);

        $dataKey = generateSessionDataKey($sessionId);
        $dataString = $this->redisClient->get($dataKey);
        if ($dataString == null) {
            if ($lockToken !== null) {
                $this->releaseLock($sessionId, $lockToken);
            }
            return null;
        }

        $fullData = $this->serializer->unserialize($dataString);
        $currentProfiles = [];
        $data = [];

        if (isset($fullData['profiles'])) {
            $currentProfiles = $fullData['profiles'];
        }

        if (isset($fullData['data'])) {
            $data = $fullData['data'];
            //Data was not found?
        }

        $currentProfiles = $sessionManager->performProfileSecurityCheck(
            $userProfile,
            $currentProfiles
        );

        return new RedisSession(
            $sessionId,
            $this,
            $sessionManager,
            $data,
            $currentProfiles,
            true,
            $lockToken
        );
    }
function openSessionByID($sessionId, SessionManager $sessionManager, $userProfile = null)
    {
        $sessionId = (string)$sessionId;

        $lockToken = $this->acquireLockIfRequired($sessionId, $sessionManager);

        $dataKey = generateSessionDataKey($sessionId);
        $dataString = $this->redisClient->get($dataKey);
        if ($dataString == null) {
            if ($lockToken !== null) {
                $this->releaseLock($sessionId, $lockToken);
            }
            return null;
        }

        $fullData = $this->serializer->unserialize($dataString);
        $currentProfiles = [];
        $data = [];

        if (isset($fullData['profiles'])) {
            $currentProfiles = $fullData['profiles'];
        }

        if (isset($fullData['data'])) {
            $data = $fullData['data'];
            //Data was not found?
        }

        $currentProfiles = $sessionManager->performProfileSecurityCheck(
            $userProfile,
            $currentProfiles
        );

        return new RedisSession(
            $sessionId,
            $this,
            $sessionManager,
            $data,
            $currentProfiles,
            true,
            $lockToken
        );
    }
Open an existing session. Returns either the session data or null if
the session could not be found.
@param $sessionId
@param SessionManager $sessionManager
@param null $userProfile
@throws AsmException
@return null|string