With the 2 controllers, I can set the user controller to just have the standard user functions, but then have the UsersAdmin controller require that the user is an admin to access it. It also allows for separate functions so that the user can edit their account settings, but with limited access. Only the Admin can edit the username and stuff like that. If there is a better way to be using the Auth component, I would love to hear it, but having the controller split into normal/admin seems to be the only way I found to make it work. And since there is a ton of shared code between them, I wanted to have the admin inherit from the normal, then add in the additional functionality.
So that's where I am right now. I hope that sheds some light on what I am trying to accomplish.
~Michael
On Mon, Jul 27, 2009 at 4:46 PM, brian <bally.zijn@gmail.com> wrote:
You might have to include the path:
On Mon, Jul 27, 2009 at 10:32 AM, Michael Gaiser<mjgaiser@gmail.com> wrote:
> When I try that, I end up with this error
>
> Fatal error: Class 'LocationController' not found in
> C:\wamp\www\theinconnu\app\controllers\locationmanager_controller.php on
> line 6
http://api.cakephp.org/class/app#method-Appimport
"Location" would be the name of the model. If your class file says
> So for the parent controller name, do I use 'Location' or
> 'LocationController'?
"class LocationController ..." at the top, that's the name to use.
Although it really should be LocationsController.
But I wonder if you'd be better off without importing one controlller
into another. You began by mentioning something called UserAdmin,
which suggests that you could just stick with Users and admin routing.
Where does this LocationController fit in?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment