![]() |
Login Sessions Oh My - 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: Login Sessions Oh My (/showthread.php?tid=22353) |
Login Sessions Oh My - El Forum - 09-06-2009 [eluser]vinoth15[/eluser] By default CI maintains sessions when browsers is closed. I would like to destroy a session when a user closes the browser. I have it working that using this code in the session.php library line: 655. setcookie( $this->sess_cookie_name, $cookie_data, 0, // <-- modified code. $this->cookie_path, $this->cookie_domain, 0 if a user closes the browser it destroys a session. The problem i have is if a user navigates or refreshes the current page after logging in. The session does not remain. I would like to have the seesion state remain until the browser is closed. thx vin Login Sessions Oh My - El Forum - 09-06-2009 [eluser]Mareshal[/eluser] play in config.php file put session lifetime 86400 //in seconds, which means 1 day and cookies will stay |