How to override models and controllers in a plugin in CakePHP?
How can I override the CakePHP plugin from within the application? I see that overriding the view is very easy ( http://book.cakephp.org/2.0/en/plugins.html#overriding-plugin-views-from-inside-your-application ), but how can I override the controller or model ?
source to share
You can override and extend the list of plugin modules and controllers. See the link below for a good example of this.
https://github.com/CakeDC/users#how-to-extend-the-plugin
It's basically a summary ... In your model, you need to declare it like this.
App::uses('UsersController', 'Users.Controller');
class AppUsersController extends UsersController {
}
source to share