KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following code: <?php if (!$this->Auth->user()) { echo $this->element('header'); } else { echo $this->element('header-bar'); } ?> inside my view which should show a different header for logged in users but throws the following error: Notice (8): Undefined property: View::$Auth [APP/views/layouts/page.ctp, line 17] Fatal error: Call to a member function user() on a non-object in /Users/cameron/Sites/thehive/app/views/layouts/page.ctp on line 17 How do I fix this? Thanks
Tags (comma-separated)
Save Edits
Cancel