Welcome Guest, Not a member yet? Register   Sign In
Session destroy issue
#1

[eluser]Bees[/eluser]
Code:
$this->session->unset_userdata('logged_in')
  $this->session->sess_destroy();
I have used this code for session destroy.. but its not working . can anyone help pls..

I have updated config file as well
#2

[eluser]weboap[/eluser]
-save logged_in session content
-destroy session
-set session logged_in with the same content
-unset logged_in value in session

???
what are you trying to do exactly????? i mean what is your logic in that
#3

[eluser]Bees[/eluser]
Code:
$this->session->unset_userdata('logged_in');
$this->session->sess_destroy();

I have done in this way...
But after logging out and log in as another user with different session, at some part of the application old session will be working , so the user will chnaged to the user logged in first....

#4

[eluser]Aken[/eluser]
Your first example makes NO sense.

In my opinion, it's a never a good idea to destroy the session entirely. Just change / remove the specific details for your situation (like, remove the user data if someone is logged in).
#5

[eluser]Bees[/eluser]
Thanks for the answer.

All the session has to be change while we are logging as different user..
As i think so i have destroyed the session.....

In your opinion when can we destroy a session... no we need not destroy a session at all


#6

[eluser]Bees[/eluser]
What i can tell you is you just replace the existing session library in the CI system library folder with new session class Native php session...
All the issues will be resolved....
#7

[eluser]InsiteFX[/eluser]
Your session should be destored when the user logs out in your logot method and
on browser close which you can set in config.php





Theme © iAndrew 2016 - Forum software by © MyBB