set('currentuser', $this->Auth->user()); $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login'); $this->Auth->loginRedirect = array('controller' => 'enquiries', 'action' => 'index'); $this->Auth->allow('display'); $this->Auth->authorize = 'controller'; if($this->RequestHandler->isAjax()) { Configure::write('debug', 0); } } function isAuthorized() { return true; } } ?>