Welcome Guest, Not a member yet? Register   Sign In
adding custom session data to a DB question
#1

[eluser]alebenson[/eluser]
hi there!

trying to understand things here

I have my session libray lodead with a db for validation

if i add a 'custom data'...
i.e.:
Code:
$this->session->set_userdata('USUARIO', 'pepe');
that info is store into the DB too?....
i guess not because there is not such field to store userdata (correct me if im wrong please)

so i have stored the USUARIO just in my cookie to know who is logged

what if someone edit the cookie and change the USUARIO to anotherone that is valid and logged?
it will start browsing with other account¿?¿?

so i have to enable the encryption and that will not happend


im just thinking this because i have never handle cookies and session.. i dont understand to much yet

thanks for the help.
#2

[eluser]dawnerd[/eluser]
Use Db_Session.
#3

[eluser]Derek Allard[/eluser]
correct. Currently the CI session library still saves custom session data in the cookie and not the database. This is something I intend on addressing, and I'd like to get it in before we release CI 1.6.
#4

[eluser]alebenson[/eluser]
oh! thanks to answer...
now i can understand a little more, hope you can make things run for the 1.6

tranks tranks tranks!
#5

[eluser]murphy2006[/eluser]
[quote author="Derek Allard" date="1200945577"]correct. Currently the CI session library still saves custom session data in the cookie and not the database. This is something I intend on addressing, and I'd like to get it in before we release CI 1.6.[/quote]

Was this included in the CI 1.6 sessions library?

Thanks,
Daniel
#6

[eluser]alebenson[/eluser]
take a look
http://ellislab.com/codeigniter/user-gui...gelog.html
#7

[eluser]Derek Allard[/eluser]
No, custom data is still saved in a cookie. With all the other stuff going on, this wasn't added, but its still on my radar.
#8

[eluser]WolfgangA[/eluser]
Have a look at NGSession.
It is build upon CI's Session in v1.6 in combination with DBSession and transparent supports storing userdata in both, database and cookies.
You can use it as a drop in replacement for the current CI 1.6 session lib.

Current Thread

More details can be found in the wiki: NGSession




Theme © iAndrew 2016 - Forum software by © MyBB