Hey,
So I'm hoping you can help.
I'd like to list out some data for all users, that is currently set within their user session.
I have my CI3 set to use the database driver for session and essentially in each function of my controller I am setting the page they calling / visiting.
An example would be as follows:
Code:
function index()
{
$meta['title'] = 'title';
$meta['tagline'] = 'tagline';
$this->session->set_userdata('page', 'front page'); // set current page in session data
$this->load->view('public/header', $meta);
$this->load->view('public/homepage');
$this->load->view('public/footer');
}
As this is set for every user, logged in or not, what I'd like to do is have a page within my dashboard in which I can view all page entries within the session table.
Basically allowing me to see what page a user is on at any given time.
I can dump this data as follows:
Code:
<?php
//DEBUG ONLY
echo '<hr>';
echo "<pre>";
print_r($this->session->all_userdata());
echo "</pre>";
?>
However this is returning everything for a SINGLE user. Me.
I'd like to call parts of the stored session data, but for all users.
Ideally I'd like username, userid and page.
Can anyone point me in the right direction please?
Thanks!