Codeigniter - get all users session data

To get all session data you can use $this->session->all_userdata();

To print all your session variable use this line anywhere in your code :

echo '<pre>'; print_r($this->session->all_userdata());exit;

You can use db session. So data will be stored to the database. See Saving Session Data to a Database

If you have no database support just use cookie and get the data with

$username = 'John Doe';
$this->session->set_userdata('username',$username);
$var = $this->session->userdata;
echo $var['username'];