Jump to content
Larry Ullman's Book Forums

erik.belusic

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by erik.belusic

  1. thanks for the quick response and all the help so far larry!

     

    just to clarify, you believe i should have a buy table, with a buyer model and also a seller table with a seller model?

     

    if this is the case, how would i organize the authentication process? i would need to make sure "/seller/profile/update is denied to guests (easy) and someone logged in as a buyer? i know there are isGuest() and a corresponding function for authenticated. how do i handle this with two separate tables and models? can i have two separate classes for authenticating, one for each?

     

    for the "admins" i was thinking about trying to have a area that is locked down, and completely separate, similar to what wordpress does. i like securing my admin areas with extra layers of security (ip address restriction and un/pw with .htaccess). i saw a post somewhere (may not have been here) where a person created backend.php and mimicked index.php. i was wondering if it is possible to have a second yii application exist in a subdirectory eg. "/adminpanel" and access the same database and just function very very differently.

     

    thanks,

     

    erik

  2. i just purchased the yii book, and just started developing an application with yii.

     

    the application calls for multiple user account types, and multiple user portals. the basic account types would be admin, seller, buyer.

     

    i am looking for the best way (best practice) to set this up. i was thinking there would be one users table, and then a seller table and a buyer table. the reason for separate tables would be that we would be storing different information about the users and the buyers. this then makes users have a 1:1 relationship with either buyer or seller table. so im still undecided here, because my understanding is that 1:1 relationships shouldnt exist. then this made me wonder if the account info should just be stored in buyer/seller table accordingly.

     

    now, relating back to yii, would i want a model for user, and then models for buyer and seller and extend the user class that i create, or would i want separate classes for buyer and seller and skip the user model all together.

     

    the catch is that i want to use one login form and one registration form for both with a radio button or something to that nature, but depending on which account type you are making, different information would be collected upon registration, and different views would exist when logged in.

     

    im a total yii NOOb, so any help or insight anyone has would be GREATLY appreciated. at least help me going in the right direction

×
×
  • Create New...