DarkAuth assume every controller has access to the User model.
Which is why is recommends adding $uses=array('User') to
AppController.
If this is not the case, then you'll need to add the User model to
your GalleryController.
That should solve the problem.
Chris.
On May 14, 4:38 am, "(withheld)@gmail.com" <[EMAIL PROTECTED]>
wrote:
> Hi, I'm trying to set up a gallery on one of my applications, I
> followed this tutorial and made changes for 1.2
>
> http://www.sitepoint.com/article/photo-gallery-cakephp-flickr
>
> I am also using darkAuth to handle my authentication, which seems to
> be causing me problems, when i load my galleries controller I get this
> response back:
>
> Notice (8): Undefined property: GalleryController::$User [APP/
> controllers/components/dark_auth.php, line 236]
>
> $conditions[$field] = $this->user_live_value;
> };
> $check = $this->controller->{$this->user_model_name}-
>
> >find($conditions);
>
> DarkAuthComponent::authenticate() - APP/controllers/components/
> dark_auth.php, line 236
> DarkAuthComponent::authenticate_from_session() - APP/controllers/
> components/dark_auth.php, line 202
> DarkAuthComponent::getUserInfoFromSessionOrCookie() - APP/controllers/
> components/dark_auth.php, line 349
> DarkAuthComponent::startup() - APP/controllers/components/
> dark_auth.php, line 59
> Dispatcher::start() - CORE/cake/dispatcher.php, line 316
> Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 223
> [main] - APP/webroot/index.php, line 84
>
> Fatal error: Call to a member function find() on a non-object in /
> Applications/MAMP/htdocs/app/controllers/components/dark_auth.php on
> line 236
>
> I'm not exactly sure why this is happening, the only thing i can think
> of is phpFlickr using a veriable darkAuth needs, does this look like
> the case?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---