Show
Ignore:
Timestamp:
02/22/08 13:58:35 (11 months ago)
Author:
aarkerio
Message:

Changes on users and entries

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/app/app_controller.php

    r242 r246  
    11<?php 
    2 /** Manuel Montoya GPL v3 */ 
     2/** 
     3*     Karamelo eLearning Platform 
     4*     Chipotle Software 2002-2008 
     5*     GPLv3 manuel<arroba>mononeurona<punto>org 
     6**/ 
    37 
    48class AppController extends Controller { 
     
    1014 public function beforeFilter() 
    1115 { 
    12      $this->Auth->fields = array('username' => 'username', 'password' => 'password'); 
     16     $this->Auth->fields = array('username' => 'username', 'password' => 'pwd'); 
    1317     $this->Auth->loginAction = array('controller' => 'users', 'action' => 'login'); 
    1418     $this->Auth->loginRedirect = array('controller' => 'news', 'action' => 'display'); 
     
    1620     $this->Auth->loginError = 'Invalid e-mail / password combination. Please try again'; 
    1721     $this->Auth->authorize = 'controller';   
    18      $this->Auth->allow( array('display', 'view', 'register', 'recover') ); 
     22     $this->Auth->allow( array('display', 'view', 'register', 'recover', 'sendmail') ); 
    1923 
    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; 
    2134 } 
    2235}