I am using auth component and it works ok.
But in my default layout before the content I have some menu which is different if user is logged in. So I want to determine if user is logged in or not – normally I use $this->Auth->user(‘id’) but $this->Auth doesnt work in layout (it only works in view which controller is using Auth component).
How to do it?
You can read Auth data from session. Something like:
Don`t forget to add Session helper in your AppController.