CodeIgniter Forums
CI Session library improvement - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: CI Session library improvement (/showthread.php?tid=24851)



CI Session library improvement - El Forum - 11-22-2009

[eluser]Shay Falador[/eluser]
Hey there,
I am new at this forum.

I have been looking for the last hour for a solution for regenerating CI session id.
But, I saw many solutions and non of them was what I am looking for, so I decided to simply add a few things to the default library.
I would like to hear what do you think of this, but first, what have I done:

- Added the method new_id which regenerates the sessions id
- Added the variable had_new_id which holds TRUE if either the method update or new_id
were executed.
- Edited the method update to set had_new_id to TRUE

The code is here Smile

Thanks!