0

My "Auth" is set in the AppController (to use Form) for all of my controllers. I have one "special" controller which needs to use BasicAuthenticate and then getUser().

With this in the controller: public $components = array( 'Auth' => array( 'authenticate' => array('Basic') ) );

And this in the function: $newUser = $this->Auth->Basic->getUser(); or $newUser = $this->Auth->getUser();

I keep getting the error "Call to a member function getUser() on a non-object".

How do I override the "Auth" set in the AppController for just one of the controllers so that I can use getUser()?

3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.