[eluser]Nick Jennings[/eluser]
That solves the problem of keeping 'admins' logged in after using the front-end. However the front-end is a shopping cart like function and after the purchase has been completed all the session data needs to be destroyed, so the 'admin' could go back and re-do it as a new user.
So I would really need two sessions, as far as I can tell.. Is codeigniter limited to just one session setup per app?
Thanks,
Nick
[quote author="bigtony" date="1252498422"]I presume there is some kind of login process for the admin to access the back-end, so you could simply set a session variable so you know this has happened.
Code:
$this->session->set_userdata('admin', 1);
Then, condition your front-end so it only ends the session when the admin session variable is not set.
Code:
if (($this->session->userdata('admin') != 1):
// End front end session stuff...
endif;
[/quote]