[eluser]inktri[/eluser]
Two questions about the default Sessions library using a database
1.) How are records in the sessions db deleted? Is there a way to have session records be deleted based on the value of the last_activity field (ie. whenever garbage collection is run, delete all records with last_activity > X hours ago)?
2.) I use the sessions class only to hold one variable. My CI script calls
Code:
set_userdata($username)
on the user's username whenever he/she logs in. And when he/she logs out, all I do is
Code:
unset_userdata($username)
. What's the downside to doing this as opposed to sess_destroying upon logout? I can see a benefit in doing so: there will be less records in the session table