Changeset 246 for trunk/app/app_controller.php
- Timestamp:
- 02/22/08 13:58:35 (11 months ago)
- Files:
-
- 1 modified
-
trunk/app/app_controller.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/app/app_controller.php
r242 r246 1 1 <?php 2 /** Manuel Montoya GPL v3 */ 2 /** 3 * Karamelo eLearning Platform 4 * Chipotle Software 2002-2008 5 * GPLv3 manuel<arroba>mononeurona<punto>org 6 **/ 3 7 4 8 class AppController extends Controller { … … 10 14 public function beforeFilter() 11 15 { 12 $this->Auth->fields = array('username' => 'username', 'password' => 'p assword');16 $this->Auth->fields = array('username' => 'username', 'password' => 'pwd'); 13 17 $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login'); 14 18 $this->Auth->loginRedirect = array('controller' => 'news', 'action' => 'display'); … … 16 20 $this->Auth->loginError = 'Invalid e-mail / password combination. Please try again'; 17 21 $this->Auth->authorize = 'controller'; 18 $this->Auth->allow( array('display', 'view', 'register', 'recover' ) );22 $this->Auth->allow( array('display', 'view', 'register', 'recover', 'sendmail') ); 19 23 20 $this->set('cU', $this->Auth->user()); // $cU current user 24 $this->set('cU', $this->Auth->user()); // $cU current user array to use in the views if user logged 25 } 26 27 public function msgFlash($msg, $to) 28 { 29 $this->Session->setFlash($msg); // http://manual.cakephp.org/chapter/session 30 31 $this->redirect($to); 32 33 exit; 21 34 } 22 35 }
