Is there a special way to refer to variables that are set in the app
controller?

I have:

class AppController extends Controller {


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


        function beforeFilter() {
                if($this->Session->check('User')){
                                $this->set('user', 
$this->User->findById($this->Session-
>read('User.id')));
                                }else{
                                $this->set('user', 'emptysession');
                                }
            }



}


View:


<?php
print_r($user);
?>



I get "Undefined variable: user".

I'm sure this is easy but I've searched all around and can't find an
answer.  Thanks for any help you can provide.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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