Hi guys,
I try to see what i'm doing wrong at the moment to make this stop
creating twice row in profile when i create a user with the profile
form embed.
Someone see something wrong in this ?
Profile:
columns:
sf_guard_user_id: integer(4)
first_name: string(255)
middle_name: string(255)
last_name: string(255)
email_address: string(255)
relations:
User:
class: sfGuardUser
foreignType: one
class registerActions extends sfActions
{
public function executeIndex(sfWebRequest $request)
{
$this->form = new RegisterForm();
$profileForm = new ProfileForm();
unset($profileForm['id'], $profileForm['sf_guard_user_id']);
$this->form->embedForm('Profile', $profileForm);
if ($request->isMethod('post'))
{
$this->form->bind($request->getParameter('sf_guard_user'));
if ($this->form->isValid())
{
$this->form->save();
$this->getUser()->signIn($this->form->getObject());
//$this->redirect('@homepage');
}
}
}
}
Thanks a lot !
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---