Class

SessionData

Package: PHPBoost\User\session Copyright: © 2005-2019 PHPBoost License: GNU/GPL-3.0 Author: Loic ROUCHON horn@phpboost.com Version: PHPBoost 5.2 - last update: 2019 02 28 Since: PHPBoost 3.0 - 2010 11 04 Contributor: Kevin MASSY reidlos@phpboost.com Contributor: Julien BRISWALTER j1.seth@phpboost.com Contributor: Arnaud GENET elenwii@phpboost.com Contributor: mipel mipel@phpboost.com Located at: phpboost/user/session/SessionData.class.php

This class manages all sessions for the users.

Methods summary
protected
# __construct( $user_id, $session_id )
public
public
public
public
public
public
# get_ip( )
public
public
public
public
public
# has_cached_data( $key )
public
# get_cached_data( $key, $default = null )
public
# add_cached_data( $key, $value )
public
public
public
# has_data( $key )
public
# get_data( $key )
public
# add_data( $key, $value )
public
# remove_data( $key )
public
public
# save( )
public
# delete( )
public
public
# location_id_already_exists( $location_id )
public
# get_user_on_location_id( $location_id )
public static
public static
# gc( )
public static SessionData
public static SessionData
# create_from_user_id( integer $user_id )
public static
public static
# update_location( $title_page, $location_id = '' )
public static
protected
# update_user_info( $user_id )
public
# csrf_post_protect( )

Check the session against CSRF attacks by POST. Checks that POSTs are done with the token of the current session. If the token of the request doesn't match the token of the current session, this method will consider that it's a CSRF attack.

public
# csrf_get_protect( )

Check the session against CSRF attacks by GET. Checks that GETs are done with the token of the current session. If the token of the request doesn't match the token of the current session, this method will consider that it's a CSRF attack.

Constants summary
string DEFAULT_VISITOR_DISPLAY_NAME
# 'visitor'
Properties summary
protected $user_id
#
protected $session_id
#
protected $token
#
protected $timestamp
#
protected $ip
#
protected $location_script
#
protected $location_title
#
protected $location_id
#
protected array $cached_data
# array()
protected array $data
# array()
protected boolean $cached_data_modified
# false
protected boolean $data_modified
# false