Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Disable sessions
  • Hi,

    I've got a front controller and backend controller. Is there a way to disable sessions on the front controller but not on the backend controller?
  • What do you mean by "disable sessions"?

    If you call the Session class, it will be used. What you can do is disable the session cookie from being created on the response.

    If you want to do that per request, you need to call set_config('enable_cookie', false) on the session instance.
  • No i mean, on the front controller i don't need sessions, but only on the backend, i thought there was some sort of auto init of sessions?
  • The Session class initializes upon load.

    If you don't autoload it (in always_load in the config) but for example load it in the base controller of your backend, then there's no session in the frontend.
  • Ok cool! Thanks

Howdy, Stranger!

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

In this Discussion