Hi,
You can embed the profile form into the registration form and let the
user fill it:

In your registration form class, configure() method, add:

  $profile_form = new YourProfileForm($this->object->Profile);
  $this->embedForm('Profile', $profile_form);


Or you can do it inside the action registration after you save the new
user.

in the executeRegistration() method after saving the new user

  $profile = new Profile();
  //user_id is the filed in the database that represents the relation
with the user
  $profile->user_id = $user_registration_form->getObject()->id;
  $profile->save();

The second solution creates an empty profile with only the relation
with the user, so I suggest you to use the first one,

Filippo

On Feb 13, 1:58 pm, Olivier Ricordeau <[email protected]>
wrote:
> Hi!
>
> I'm using the sfGuardPlugin and I'd like the registration form to
> automatically create a row in my profile table when an account is
> created. Could anyone tell me what I have to do?
>
> Cheers,
> Olivier
>
> --
> - **Olivier RICORDEAU** -
>  [email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.

Reply via email to