Need help reducing database requests to check if a user is logged in |
[eluser]stef25[/eluser]
From the user guide: "The Session class does not utilize native PHP sessions" and I would avoid using $_SESSION - stick to the CI way. Usually data is just stored in a cookie. There is an option (I didn't know of) that lets you also store it in on the server side in a db table. See "Saving Session Data to a Database" here: http://ellislab.com/codeigniter/user-gui...sions.html I use the db_session extension from the wiki. Not sure what the difference is between this and the DB option of the native CI session class. The main advantage of saving things on the DB side is that you are not limited by the 4KB max data you can store in a cookie. The manual really explains it better than I could ![]() http://ellislab.com/codeigniter/user-gui...sions.html |
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
|