![]() |
Session lib - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Session lib (/showthread.php?tid=3774) |
Session lib - El Forum - 10-21-2007 [eluser]leonglass[/eluser] I have a class that I have used before for managing sessions that makes use of phps session handling and using a db. I have been looking at CIs session class and have seen that the actual user data for the session is still stored in a cookie even when you set it to use the db. The class I have places the user data into a field in the db as name value pairs separated with semi-colons. My questions are - is the way CI does sessions better than the way I have been doing and if so why? What do you all think of using my own class as a lib in CI does that make sense or not? thanks Session lib - El Forum - 10-21-2007 [eluser]Michael Wales[/eluser] I'm not sure if it's better, but I have had no issues using the default CI method. There are already some user created libraries out there to use native PHP sessions or to store all of the data in the database. If you create a CI library out of your class, I'm sure it will be a welcome addition to the community. Session lib - El Forum - 10-22-2007 [eluser]leonglass[/eluser] [quote author="walesmd" date="1193009524"]I'm not sure if it's better, but I have had no issues using the default CI method. There are already some user created libraries out there to use native PHP sessions or to store all of the data in the database. If you create a CI library out of your class, I'm sure it will be a welcome addition to the community.[/quote]Thanks for replying. Where do you generally find user created libs? Session lib - El Forum - 10-22-2007 [eluser]leonglass[/eluser] OK here it is. Session.php Code: <?php Session lib - El Forum - 10-22-2007 [eluser]Michael Wales[/eluser] You can find the user created libraries in the Wiki - the most recent version of CI (available in the SVN repo) has an updated Session library as well, supporting flashdata and ID regeneration. You should definitely post your library as a new article in the Wiki. Session lib - El Forum - 10-23-2007 [eluser]leonglass[/eluser] Ok I will look at doing that. Thanks for telling where to find user created libs. |