Need help reducing database requests to check if a user is logged in |
[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-25-2009, 06:51 PM
Need help reducing database requests to check if a user is logged in - by El Forum - 12-26-2009, 04:54 AM
Need help reducing database requests to check if a user is logged in - by El Forum - 12-26-2009, 05:14 AM
Need help reducing database requests to check if a user is logged in - by El Forum - 12-26-2009, 05:21 AM
Need help reducing database requests to check if a user is logged in - by El Forum - 12-26-2009, 05:32 AM
Need help reducing database requests to check if a user is logged in - by El Forum - 12-26-2009, 10:09 AM
Need help reducing database requests to check if a user is logged in - by El Forum - 12-26-2009, 11:11 AM
Need help reducing database requests to check if a user is logged in - by El Forum - 12-26-2009, 03:20 PM
|