Monday, April 4, 2011

RE: Place action where?

Well essentially every one is a User but when registering as either,
validation, forms and fields in the form are different. As a buyer there are
User and Buyer fields, and as a Seller Buy and Seller fields. Buyer and
Seller are not just related _id's they are an actual object. User has just
username and password stuff where as Buyer or Seller contain all the details
for that person and the fields in the db differ drastically.

Passing variable just means 1 large function if (buyer) {

//all the code to register as a buyer

} else {

//all the code to register as seller

}


-----Original Message-----
From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf
Of Warren
Sent: Monday, April 04, 2011 5:36 AM
To: cake-php@googlegroups.com
Subject: Re: Place action where?

On 04/04/2011 05:47, Krissy Masters wrote:
> How should this be set up?
> User can register as a Buyer or Seller each with different criteria needed
> in the form so 2 forms.
> Would you make 2 registration methods in the User controller
> buyer_registration() and seller_registration(){} or a register in buyer
> controller and register in seller controller? Each is a "User".
>
> Thanks,
>
> K
>
Are you setting up different models for each form? Each extending the
user model?

--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help
others with their CakePHP related questions.


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

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


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

No comments: