source: Dev/branches/cakephp/app/app_controller.php @ 126

Last change on this file since 126 was 126, checked in by fpvanagthoven, 14 years ago

Cakephp branch.

File size: 1.7 KB
Line 
1<?php
2
3/**
4 * Application level Controller
5 *
6 * This file is application-wide controller file. You can put all
7 * application-wide controller-related methods here.
8 *
9 * PHP versions 4 and 5
10 *
11 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
12 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
13 *
14 * Licensed under The MIT License
15 * Redistributions of files must retain the above copyright notice.
16 *
17 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
18 * @link          http://cakephp.org CakePHP(tm) Project
19 * @package       cake
20 * @subpackage    cake.cake.libs.controller
21 * @since         CakePHP(tm) v 0.2.9
22 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
23 */
24
25/**
26 * This is a placeholder class.
27 * Create the same file in app/app_controller.php
28 *
29 * Add your application-wide methods in the class below, your controllers
30 * will inherit them.
31 *
32 * @package       cake
33 * @subpackage    cake.cake.libs.controller
34 * @link http://book.cakephp.org/view/957/The-App-Controller
35 */
36class AppController extends Controller {
37
38    /**
39     *
40     * @var AuthComponent
41     */
42    var $Auth;
43   
44    var $components = array('Auth', 'Session');
45
46    function beforeFilter() {
47        $this->Auth->allow('login');
48
49        $this->Auth->loginAction = array('controller' => 'pages', 'action' => 'display', 'home');
50        $this->Auth->loginError = "This message shows up when the wrong credentials are used";
51        $this->Auth->authError = "Please log in first.";
52//        $this->Auth->loginRedirec
53        $this->Auth->logoutRedirect = array('controller' => 'pages', 'action' => 'home');
54    }
55
56}
Note: See TracBrowser for help on using the repository browser.