1
votes

enter image description hereI am developing login functionality in cakephp.

I Created UsersController,in that login function is there and AppController.phpalso is there in app/controller/AppController.php.

I called auth component in AppController.php. But thats not working ..

It's showing AppController not found error ...

how can we extend Appcontroller page in UsersController?

Please clarify this doubt to me any one can help..

1
Can you show some code?Sean Doe
Does AppController.php exist? It should exist in the same folder as your UsersController.phpjoshua.paling
class AppController extends Controller { public $components = array( 'Auth' => array( 'authorize' => 'controller' ), 'Session' ); public function isAuthorized() { return true; } }S raju
Are you sure app/controller/AppController.php is the path of your appController ? if so please change it to app/Controller/AppController.phpAnil kumar
ok its working now thanks a lotS raju

1 Answers

3
votes

You need to include the below at the top of your UsersController class. This will include the AppController class. It is after this you can now extend the AppController or even make reference to it.

App::uses('AppController', 'Controller');