Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Session not destroyed after Auth::logout();
  • 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
  • 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.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion