TIP: Use Markdown or, <pre> for multi line code blocks / <code> for inline code.
These forums are read-only and for archival purposes only!
Please join our new forums at discourse.kohanaframework.org
Destroying session vs logged user
  • Could you advise me little bit?

    I am passing session between controllers, when the final controller is reached I just destroy the session, but the same time I use the Auth method to authenticate the users. As you may suspect, when the session is destroyed, the user's session is destroyed too.

    How can I destroy selected session and keep the user logged in? I tried to use the session names, but I do not know if that's the right thing in my case.

    What would be the best practice here?

    Thank you.

  • I think I found a way: just by unset ($_SESSION['myvar']).

  • You can also do Session::instance()->delete('myvar');

  • Thanks!

Howdy, Stranger!

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

In this Discussion