Also, as far as calling a controller from a component, whoever told you that it was okay to do $this->controller from inside a component was lying. $controller is not a property of your component object, nor has it ever been. As of the latest release of Cake 1.2, components now have two callbacks, startup( ) and shutdown( ), which look like this:
function startup(&$controller) { // ... } function shutdown(&$controller) { // ... } That's how you get access to the controller. On Feb 4, 12:19 am, "Vu Nguyen" <[EMAIL PROTECTED]> wrote: > Also, I'm having a hard time calling a controller's method from a > component: > > $this->controller->User->findAll(); > > error: > > Notice: Undefined property: AppController::$User > > Fatal error: Call to a member function findAll() on a non-object --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---