Yii Framework Forum: Yii-User Registration Form - Yii Framework Forum

Jump to content

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

Yii-User Registration Form Change Registration form text fields, Rate Topic: ***-- 3 Votes

#1 User is offline   Shekeel 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 22-August 13
  • Location:Canada

Posted 23 August 2013 - 02:17 AM

Hi:
I am new to yii, i have to develop a user Registration form, for this purpose i am using Yii-user and yii-Rights Extension,
I searched a lot, but did couldn't found the solution,
Please suggest me some solution,
For Example: Already existing fields are UserName, Password, retype-Password, Email, FirstName, LastName and DOB,
but the fields required to me are,
- UserName
- FirstName
- LastName
- MiddleName
- DateofBirth
- EmailAddress
- Address
- City
- State
- Zip
- Country
- ContactNumber

how I have to change Model, Controller and View as well,
Please Reply, Thanks.
0

#2 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 883
  • Joined: 20-April 11
  • Location:India

Posted 23 August 2013 - 02:53 AM

Alter the users table with new fields

Add new fields to the User,RegistrationForm models
Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
0

#3 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 883
  • Joined: 20-April 11
  • Location:India

Posted 23 August 2013 - 02:55 AM

in User Model

example

change According to your fields

public function defaultScope()
    {
        return CMap::mergeArray(Yii::app()->getModule('user')->defaultScope,array(
            'alias'=>'user',
            'select' => 'user.id, user.username, user.email, user.create_at, user.lastvisit_at, user.superuser, user.status, user.country, user.region, user.website_url,user.company_name, user.city, user.state, user.nationality, user.phone,user.address,user.zip_postal_code',
        ));
    }

Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
1

#4 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 883
  • Joined: 20-April 11
  • Location:India

Posted 23 August 2013 - 02:56 AM

also edit the rules

public function rules()
	{
		

Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
0

#5 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 883
  • Joined: 20-April 11
  • Location:India

Posted 23 August 2013 - 02:57 AM

Note that the RegistrationForm is extended from User

class RegistrationForm extends User {

Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
0

#6 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 883
  • Joined: 20-April 11
  • Location:India

Posted 23 August 2013 - 02:59 AM

Also Change the view forms according to your needs!!

thats it!!
Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
0

#7 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 883
  • Joined: 20-April 11
  • Location:India

Posted 23 August 2013 - 03:00 AM

http://www.yiiframew...reated-yii-app/
Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
0

#8 User is offline   Shekeel 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 22-August 13
  • Location:Canada

Posted 23 August 2013 - 04:08 AM

Thanks Rajith R,
0

#9 User is offline   Shekeel 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 22-August 13
  • Location:Canada

Posted 26 August 2013 - 04:54 AM

View PostRajith R, on 23 August 2013 - 03:00 AM, said:



dear that not worked a lot, please tell me some in details,
Thanks.



0

#10 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 883
  • Joined: 20-April 11
  • Location:India

Posted 27 August 2013 - 12:27 AM

View PostShekeel, on 26 August 2013 - 04:54 AM, said:

dear that not worked a lot, please tell me some in details,
Thanks.

whats the problem now?
Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
0

#11 User is offline   Shekeel 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 22-August 13
  • Location:Canada

Posted 27 August 2013 - 03:10 AM

One thing that I found now, that i should first setup smtp mail service,
Please tell me about this,
How to enable yii-user to send activation mail to newly registered users,
I have installed xampp in D:\xampp\ and my project lies @ D:\xampp\htdocs\project
after this step I think I will change what i needed,
Thanks....
0

#12 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 883
  • Joined: 20-April 11
  • Location:India

Posted 27 August 2013 - 04:22 AM

View PostShekeel, on 27 August 2013 - 03:10 AM, said:

One thing that I found now, that i should first setup smtp mail service,
Please tell me about this,
How to enable yii-user to send activation mail to newly registered users,
I have installed xampp in D:\xampp\ and my project lies @ D:\xampp\htdocs\project
after this step I think I will change what i needed,
Thanks....


configure your mail server.
Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
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