Hello!

I am PHP Developer for some time and developing my second CakePHP App
now :)

I am getting the following error when I access $logged_in from
default.ctp.

Notice (8): Undefined variable: logged_in [APP\views\layouts
\default.ctp, line 17]

Also this happens only when no corresponding action defined in
controller which actually is 404 in production but I still want to
access the variable. How can I do this?

This the code in default.cpt

<?php e($logged_in); ?>


I set $logged_in AppController's beforeFilter function. Following the
whole code:

class AppController extends Controller {

        var $components = array('ObAuth');

    function beforeFilter() {

        $this->set("logged_in", $this->logged_in);

        return true;
    }
}

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" 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