Welcome Guest, Not a member yet? Register   Sign In
Login Sessions Oh My
#1

[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
#2

[eluser]Mareshal[/eluser]
play in config.php file

put session lifetime 86400 //in seconds, which means 1 day

and cookies will stay




Theme © iAndrew 2016 - Forum software by © MyBB