Yii Framework Forum: [EXTENSION] customizing Yii-user - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

[EXTENSION] customizing Yii-user selection dependent profile fields Rate Topic: -----

#1 User is offline   nekdolan 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 23-March 12

Posted 23 March 2012 - 09:34 AM

I am a beginner in Yii and very short on time so I would like to ask for help.
I do have general understanding of Yii of course.

I installed the Yii-user extension and I want to customize it the following way:
When the user is registering I want to display a radio button (or drop down list) with the options *register person* and *register company* and depending on the choice different profile tables would be used.

For register person
tbl_profiles and tbl_profiles_fields
For register business
rbl_business_profiles and tbl_business_profile_fields

So when someone chooses the register business choice the fields from the business_profiles_fields would become visible instead of the ones in profiles_fields. Update operations should only work on the tables that were chosen when the user was registered.

Some hints on what files I should change and how would be much appreciated.
Thanks in advance.
0

#2 User is offline   robregonm 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 520
  • Joined: 30-July 09
  • Location:Colombia

Posted 23 March 2012 - 01:00 PM

Interesting idea, take a look at

  • modules/user/models/User.php
  • modules/user/models/Profile.php
  • modules/user/models/ProfileField.php
  • modules/user/views/*.php
Best wishes.




Ricardo Obregón
YiiFramework en Español - http://yiiframework.co/ - http://yiiframeworkenespanol.org/ - Yii Code Generator for Bootstrap
http://obregon.co/
PHP 5.3+, nginx 1.2, MySQL, MariaDB, PerconaDB, PostgreSQL, Yii 1.x-dev.
Follow me: @robregonm & @obregonco.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users