[eluser]InsiteFX[/eluser]
Add to ./application/libraries/MY_Session.php
Code:
class MY_Session extends CI_Session {
private $CI; // in case you need the CI super object.
public function __construct()
{
parent::__construct();
$this->CI = get_instance();
}
} // End of Class.
Another Example:
Code:
class MY_Session extends CI_Session {
// --------------------------------------------------------------------
/**
* sess_update()
*
* Do not update an existing session on ajax or xajax calls
*
* @access public
* @return void
*/
public function sess_update()
{
$_ci = get_instance();
if ( ! $_ci->input->is_ajax_request())
{
parent::sess_update();
}
}
// --------------------------------------------------------------------
/**
* sess_destroy()
*
* Clear's out the user_data array on sess::destroy.
*
* @access public
* @return void
*/
public function sess_destroy()
{
$this->userdata = array();
parent::sess_destroy();
}
} // End of Class.