Welcome Guest, Not a member yet? Register   Sign In
Unique Database Sessions
#1

[eluser]Unknown[/eluser]
Hey guys,

I tried doing a quick google/forum search, but couldn't find too much information about this. Since I'm in a bit of a time crunch I figured I would just post my question here. So, sorry if this has been asked before...

I'm building an application (obviously) and I was wondering if there was a way to have the database maintain unique sessions (possibly based on IP address, username). In its current state if I access the site using 2 different agents (firefox and IE) it creates 2 separate sessions. My ultimate goal is to build a session management screen to maintain and view open sessions, last activity, etc. I want to be able to see which user has a session open, regardless of his or her user agent.

So, is it possible to have unique sessions in the sense that the user_agent makes no difference? Or, will CodeIgniter just log a session for every separate user agent (regardless of username or ip)?

If it is at all possible, any help would be greatly appreciated!

Thank you all in advance.
#2

[eluser]WanWizard[/eluser]
Sessions are based on cookies, and therefore unique to every environment used.

If you define a "session" as a user begin logged-in, then the users table is the obvious place to maintain that session. Possibly combined with some other form of storage. If you use for example memcached or APC, you can use the expiry mechanisms of those storage engines.

As you can/will have concurrent access to the session, you will have to take that into account. Like what happens if the user changes the same session item in two different windows?




Theme © iAndrew 2016 - Forum software by © MyBB