Welcome Guest, Not a member yet? Register   Sign In
Need help reducing database requests to check if a user is logged in
#2

[eluser]stef25[/eluser]
Storing a TRUE / FALSE in the session would be a better solution. I do this but using the db_session function (http://codeigniter.com/wiki/DB_Session/) which keeps it in the DB instead of a cookie.

So there is still a query being run to get the TRUE / FALSE value but it's about as a light and fast as a query can get.

Or you could store it in a normal session cookie and if they delete cookies then they are also logged out. This is very common on a lot of sites.


Messages In This Thread
Need help reducing database requests to check if a user is logged in - by El Forum - 12-26-2009, 04:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB