Changeset 491 for trunk/app/app_controller.php
- Timestamp:
- 05/15/08 14:24:46 (7 months ago)
- Files:
-
- 1 modified
-
trunk/app/app_controller.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/app_controller.php
r427 r491 18 18 public function beforeFilter() 19 19 { 20 $this->Auth->fields = array('username' => 'email', 'password' => 'pwd');21 $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login');22 $this->Auth->loginRedirect = array('controller' => 'news', 'action' => 'display');20 $this->Auth->fields = array('username' => 'email', 'password' => 'pwd'); 21 $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login'); 22 $this->Auth->loginRedirect = array('controller' => 'news', 'action' => 'display'); 23 23 $this->Auth->logoutRedirect = '/news/display'; 24 $this->Auth->loginError = 'Invalid e-mail / password combination. Please try again'; 25 $this->Auth->authorize = 'controller'; 24 $this->Auth->loginError = 'Invalid e-mail / password combination. Please try again'; 25 $this->Auth->authorize = 'controller'; 26 $this->Auth->autoRedirect = true; 26 27 $this->Auth->deny('*'); 27 $this->Auth->autoRedirect = true;28 $this->set('cU', $this->Auth->user()); // $cU current user array to use in the views if user logged 28 29 $this->set('cU', $this->Auth->user()); // $cU current user array to use in the views if user logged in 29 30 } 30 31
