Hi! my appController looks like below:

class AppController extends Controller {

        var $helpers = array('Html','Ajax','Javascript');

        function beforeFilter() {
                if($this->Session->check('User'))  $this->set('userinfo',
$this->Session->read('User.username'));
        }
}


However, I get an "Undefined variable: userinfo" in my views. If I move
the beforeFilter() function to one of my controllers than I can see
$userinfo in the views associated with that particular controller. Why
can't I set $userinfo at the appController level but only at individual
controllers levels? Thx!


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to