public function isActiveSession()
    {
        // Check if session timeout is defined in application settings
        $sessionConfig = $GLOBALS['app']->getConfiguration()->getRawConfiguration('session');
        if (!empty($sessionConfig) && isset($sessionConfig['timeout']) && !empty($sessionConfig['timeout'])) {
            $sessionTimeout = $sessionConfig['timeout'];
        } else {
            $sessionTimeout = SESSION_TIMEOUT;
        }

        file_put_contents(getcwd().'/logs/session.log', print_r($_SESSION, 1));

        if(isset($_SESSION[self::GLOBAL_PREFIX.'last_accessed']) &&
            (time() - $_SESSION[self::GLOBAL_PREFIX.'last_accessed'] > $sessionTimeout)) {
            return FALSE;
        }

        return TRUE;
    }
public function isActiveSession()
    {
        // Check if session timeout is defined in application settings
        $sessionConfig = $GLOBALS['app']->getConfiguration()->getRawConfiguration('session');
        if (!empty($sessionConfig) && isset($sessionConfig['timeout']) && !empty($sessionConfig['timeout'])) {
            $sessionTimeout = $sessionConfig['timeout'];
        } else {
            $sessionTimeout = SESSION_TIMEOUT;
        }

        file_put_contents(getcwd().'/logs/session.log', print_r($_SESSION, 1));

        if(isset($_SESSION[self::GLOBAL_PREFIX.'last_accessed']) &&
            (time() - $_SESSION[self::GLOBAL_PREFIX.'last_accessed'] > $sessionTimeout)) {
            return FALSE;
        }

        return TRUE;
    }
public function isActiveSession ( ) { // Check if session timeout is defined in application settings $ sessionConfig = $ GLOBALS [ 'app' ] -> getConfiguration ( ) -> getRawConfiguration ( 'session' ) ; if ( ! empty ( $ sessionConfig ) && isset ( $ sessionConfig [ 'timeout' ] ) && ! empty ( $ sessionConfig [ 'timeout' ] ) ) { $ sessionTimeout = $ sessionConfig [ 'timeout' ] ; } else { $ sessionTimeout = SESSION_TIMEOUT ; } file_put_contents ( getcwd ( ) . '/logs/session.log' , print_r ( $ _SESSION , 1 ) ) ; if ( isset ( $ _SESSION [ self :: GLOBAL_PREFIX . 'last_accessed' ] ) && ( time ( ) - $ _SESSION [ self :: GLOBAL_PREFIX . 'last_accessed' ] > $ sessionTimeout ) ) { return FALSE ; } return TRUE ; }
Checks if session is currently active.

@access public
@return boolean
Checks if session is currently active .