Issue
I am facing a model association problem in cakephp-2.3. Described in Plugin model assiciation is not working in cakephp 2.3 with cake ACL
Now it seems to me that the UsersController in not using User model. I have used
public $uses = array ('Cauth.User');
But though it seems to me that it does not using this mode. Has there any way to check which model is using my controller in cakephp-2.3?
Solution
You may try get_class()
to find out if it is really using the 'User' model, or a generic 'AppModel' or 'Model';
Inside an action of your controller;
debug(get_class($this->User));
If it is a 'Model' or 'AppModel', CakePHP apparently wasn't able to locate or load your User model from the plugin.
Also check if you actually loaded the plugin in your bootstrap.php.
Read the documentation here: Plugins
Answered By - thaJeztah Answer Checked By - David Marino (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.