Welcome Guest, Not a member yet? Register   Sign In
Working with cookies (Yum!)
#1

[eluser]TheFuzzy0ne[/eluser]
Hi everyone.

I'm trying to achieve two things, and I'd appreciate some advice.



Checking if a user was logged in
When a users session expires, I would like for CodeIgniter to be able to tell this, and redirect the user to the login page. I know that sounds straight forward, so please hear me out. The admin control panel on the Web site I am designing is only available once someone has logged in, and the system has confirmed that they are an administrator. If a normal user browses to the admin control panel, they receive a 404 error. If I can ascertain that the user was logged in previously, and they they were an admin, I can have the system redirect them to the login page, otherwise, as far as anyone else is concerned, it doesn't exist.

Is there an easy way to achieve the results I am looking for, or have I just made my admin control panel more complicated than necessary? I'd like to think that I haven't.

Tracking read forums and posts
I'm not sure how to go about tracking which forums/posts a user has read. Does anyone know of anything that exists for CodeIgniter that can help, or anything that I can adapt to work with CodeIgniter. I've had a lot of ideas about how to do it, but seeing as it's already been done, there's no point in reinventing the wheel.

Another problem that comes to mind, is that when the cookie expires, the data for the users read forums and posts will also disappear; or will it?

Thanks in advance.

Daz.


Messages In This Thread
Working with cookies (Yum!) - by El Forum - 02-02-2009, 12:52 PM
Working with cookies (Yum!) - by El Forum - 02-03-2009, 04:09 AM
Working with cookies (Yum!) - by El Forum - 02-04-2009, 05:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB