Wednesday, October 24, 2012

Re: Extending Controller

Why would you want to extend that controller if all you are doing is putting specific functions within the new one?  You need to think how complex does your solution need to be.  If the user is editing their own information, which could include updating their password, I would think that should be within the user controller.  Same goes for forgot your password. If you are at the login screen and forgot your password I would imagine you would also include that functionality within your users controller.

I guess what I am getting at is thinking of it as a functional space.  Your controller should encompass everything that there is about a user, this could include logging in, editing ones information, forgetting ones password, etc.

On Wed, Oct 24, 2012 at 3:16 PM, Advantage+ <movepixels@gmail.com> wrote:

How can I extend a controller?

 

I want to create a PasswordsController to extend UsersController.

PasswordsController has a few specific functions to update, forgot, change password and would like to keep them separate from the UsersController since they are rather specific operations.

 

Is it possible to extend Passwords from Users other than var $uses - array('User')?

 

Thanks,

Dave

 

 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
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.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
 
 

No comments: