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.
General
Disable sessions
itcan
June 2013
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?
Harro
June 2013
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.
itcan
June 2013
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?
Harro
June 2013
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.
itcan
June 2013
Ok cool! Thanks
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
June 2013
itcan
June 2013