cmc-sales/controllers/app_controller.php
2010-05-04 15:52:33 +10:00

40 lines
753 B
PHP
Executable file

<?php
/* App Controller */
class AppController extends Controller {
var $components = array('Auth', 'RequestHandler');
var $helpers = array('Javascript', 'Time', 'Html', 'Form', 'Ajax');
function beforeFilter() {
$this->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;
}
}
?>