![]() |
My_Session library - 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: My_Session library (/showthread.php?tid=44965) |
My_Session library - El Forum - 09-02-2011 [eluser]mortenfrisi[/eluser] Hi, I want to give all my visitors an id when they enter the site (to track them before they sign up). I have made this new My_Session: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); When a user enters the site it creates this in the user_data (in the ci_session table): Code: a:1:{s:12:"user_sess_id";s:32:"67c38264fefa5663ce12e1b0e8ad4c57";} But when I add more data to the session, e.g. when I log in, it adds the data in a wrong way, like it seems creates a "double post": Code: a:6:{s:9:"user_data";s:66:"a:1:{s:12:"user_sess_id";s:32:"67c38264fefa5663ce12e1b0e8ad4c57";}";s:12:"user_sess_id";s:32:"67c38264fefa5663ce12e1b0e8ad4c57";s:7:"user_id";s:32:"f300327e9a9799167968f32047a18055";s:5:"email";s:28:"[email protected]";s:8:"usertype";s:5:"agent";s:6:"status";s:1:"1";} I have tried to change the serialize/unserialize function, but no luck. Anyone who can help? |