lib/ezsession/classes/ezpsessionhandlerdb.php
public function read( $sessionId )
    {

        $db = eZDB::instance();
        if ( !$db->isConnected() )
        {
            return false;
        }

        $escKey = $db->escapeString( $sessionId );

        $sessionRes = !$this->userHasCookie ? false : $db->arrayQuery( "SELECT data, user_id, expiration_time FROM ezsession WHERE session_key='$escKey'" );

        if ( $sessionRes !== false and count( $sessionRes ) == 1 )
        {
            eZSession::setUserID( $sessionRes[0]['user_id'] );
            $ini = eZINI::instance();

            $sessionUpdatesTime = $sessionRes[0]['expiration_time'] - $ini->variable( 'Session', 'SessionTimeout' );
            $sessionIdle = time() - $sessionUpdatesTime;

            $GLOBALS['eZSessionIdleTime'] = $sessionIdle;

            return $sessionRes[0]['data'];
        }
        else
        {
            return false;
        }
    }
public function read( $sessionId )
    {

        $db = eZDB::instance();
        if ( !$db->isConnected() )
        {
            return false;
        }

        $escKey = $db->escapeString( $sessionId );

        $sessionRes = !$this->userHasCookie ? false : $db->arrayQuery( "SELECT data, user_id, expiration_time FROM ezsession WHERE session_key='$escKey'" );

        if ( $sessionRes !== false and count( $sessionRes ) == 1 )
        {
            eZSession::setUserID( $sessionRes[0]['user_id'] );
            $ini = eZINI::instance();

            $sessionUpdatesTime = $sessionRes[0]['expiration_time'] - $ini->variable( 'Session', 'SessionTimeout' );
            $sessionIdle = time() - $sessionUpdatesTime;

            $GLOBALS['eZSessionIdleTime'] = $sessionIdle;

            return $sessionRes[0]['data'];
        }
        else
        {
            return false;
        }
    }
public function read ( $ sessionId ) { $ db = eZDB :: instance ( ) ; if ( ! $ db -> isConnected ( ) ) { return false ; } $ escKey = $ db -> escapeString ( $ sessionId ) ; $ sessionRes = ! $ this -> userHasCookie ? false : $ db -> arrayQuery ( "SELECT data, user_id, expiration_time FROM ezsession WHERE session_key='$escKey'" ) ; if ( $ sessionRes !== false and count ( $ sessionRes ) == 1 ) { eZSession :: setUserID ( $ sessionRes [ 0 ] [ 'user_id' ] ) ; $ ini = eZINI :: instance ( ) ; $ sessionUpdatesTime = $ sessionRes [ 0 ] [ 'expiration_time' ] - $ ini -> variable ( 'Session' , 'SessionTimeout' ) ; $ sessionIdle = time ( ) - $ sessionUpdatesTime ; $ GLOBALS [ 'eZSessionIdleTime' ] = $ sessionIdle ; return $ sessionRes [ 0 ] [ 'data' ] ; } else { return false ; } }
Session read handler

@param string $sessionId
@return string|false Binary session data
Session read handler