source: branches/2.0/header.session.inc.php @ 2075

Revision 2075, 681 bytes checked in by niltonneto, 14 years ago (diff)

Ticket #922 - Corrigido problema ao expirar sessão de usuário.

RevLine 
[1040]1<?php
[2075]2        if ( isset( $_COOKIE[ 'sessionid' ] ) )
3                session_id( $_COOKIE[ 'sessionid' ] );
4
[1061]5        session_start( );
[1040]6
[1061]7        $sess = $_SESSION[ 'phpgw_session' ];
[1469]8        $connection_id = "{$sess['session_id']}{$sess['session_ip']}".substr($_SERVER[ 'HTTP_USER_AGENT' ],0,199);
[1040]9
[1469]10
[1040]11        if ($_SESSION['connection_db_info']['user_auth'] && implode('',$_SESSION['connection_db_info']['user_auth']) !== $connection_id)
12        {
[2075]13                error_log( '[ NOT VALIDATED SESSION ] >>>>' . implode('',$_SESSION['connection_db_info']['user_auth']) . '<<<< - >>>>' . $connection_id . '<<<<', 0 );
[1161]14                setcookie("PHPSESSID","",0);
[2075]15                setcookie ("sessionid","",0);   
16                require_once dirname( __FILE__ ) . '/logout.php';
[1040]17                exit;
18        }
19?>
Note: See TracBrowser for help on using the repository browser.