Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Same network users use same session

There is a problem that I can not understand when working with Codeigniter Session Library. Same network users use same session (We work with a big company, and they said me this: When anybody logged in to system, then everybody logged in)! Is this possible? How, and what can I do for fix this bug?

I am using Codeigniter Core Session Library and it uses database.

like image 731
ActuallyMAB Avatar asked Nov 03 '22 02:11

ActuallyMAB


2 Answers

It is more possible to have app logic error that a session one. Maybe you can reproduce it if you try on your local development server to use 2 ore more different user accounts (from different browsers).

like image 125
Stathis Avatar answered Nov 09 '22 16:11

Stathis


http://ellislab.com/codeigniter/user-guide/libraries/sessions.html

When a page is loaded, the session class will check to see if valid session data exists in the user's session cookie. If sessions data does not exist (or if it has expired) a new session will be created and saved in the cookie. If a session does exist, its information will be updated and the cookie will be updated. With each update, the session_id will be regenerated.

I don't know where you read that same network users use the same session, but in the CodeIgniter-documentation, I find that the session is stored in a cookie, and network users will not have the problem you discribed.

like image 42
Natrium Avatar answered Nov 09 '22 15:11

Natrium