Love Fuel?
Donate
About
Forums
Discussions
Login
FuelPHP Forums
Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Auth
Session not destroyed after Auth::logout();
kay899
January 2013
Hi,
I have extended the session with the ID of my current user:
Session::set('userid', Model_User::find_by_username(Auth::get_screen_name())->id);
When I later Logout of the system this variable is still in the session.
Aren't sessions destroyed while Auth::logout(); ???
Do I really have to destroy it myself like:
public function action_logout()
{
Auth::logout();
Session::destroy();
Response::redirect('admin');
}
Thanks for a short hint.
Kay
Harro
January 2013
Destroying sessions (automatically) is a bad idea.
There might be all kinds of other information in the session that you don't want to use. I have plenty of applications where that is the case.
So yes, if you want to destroy the session, you have to do that yourself.
Add a Comment
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
5,088
General
↳ General
3,364
↳ Job Board
13
↳ Installation & Setup
214
Packages
↳ Oil
213
↳ Orm
700
↳ Auth
260
Development
↳ Tips and Tutorials
126
↳ Code share
145
↳ Applications
52
In this Discussion
Harro
January 2013