Welcome Guest, Not a member yet? Register   Sign In
Save session->user_data in the DB only
#1

[eluser]moot[/eluser]
Hello,

I've turned "sess_use_table" in config.php on. It works fine so far. However, I want to save certain session data in the database only; and not in the database and in the cookie.

Code:
// More specifically ...:
$this->session->set_userdata("is_logged_in", "1");

I don't want to have this status information in the cookie. Taking a look at the (unecrypted) cookie it seems to get saved both in the cookie and in the DB.

How can I store user data in the DB only?

Ideally, Codeigniter would save only the session id in the cookie and the rest in the DB. Maybe this can be achieved somehow without extending CI with an own lib.



#2

[eluser]InsiteFX[/eluser]
When using the database sessions the only thing stored in the cookie is the session_id thats it.
#3

[eluser]moot[/eluser]
Thank you for your answer.
>> When using the database sessions the only thing stored in the cookie is the session_id thats it.

I have checked the cookie's content and this is not the case. User agent, session id, ... user data, ... get saved in both, the cookie as well as the db.




Theme © iAndrew 2016 - Forum software by © MyBB