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

[eluser]zsoerenm[/eluser]
Hello,

I build a function "logged_in()" to check if a user is logged in.
Each time it is called it checks the ordinary sessionid(), ipadress and last activity time with database.
Imagine this function called in a loop it can be very time consuming.

Would it be a good manner to save this value with the help of CI session class so that the database request is only needed once?
I mean it saves it values in a cookie and they can be easily changed in the browser. And what happens if someone disables cookies?

Is there a other secure way of saving this value without a database request?

Thanks


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



Theme © iAndrew 2016 - Forum software by © MyBB