two objects are created, because you're trying to do this before you save Profile. You should either do that after $form->save(), or overwrite sfApply form with your own, where you'll pass the email to user object along with username and password.
To speak by example: http://github.com/fizyk/sfForkedDoctrineApplyPlugin/blob/for_sfDoctrineGuard5/lib/form/sfApplyApplyForm.class.php#L132 On 28 Sie, 21:05, Javier Garcia <tirengar...@gmail.com> wrote: > Hi, > > i have installed sfDoctrineGuardPlugin and sfDoctrineApplyPlugin. > > When a user is register through sfApply/apply i would like to save the > value of the field 'email' of that apply form in the sfGuardUser > 'email_address' field. So I added this in executeApply: > > $this->form->getObject()->getUser()->setEmailAddress($this->form->getValue('email')); > > The problem: two sfGuardUser objects are created after a user applies > for an account: the first one with the values entered in the apply form > and the second one has the 'email_address' field with the value that the > user wrote in the field 'email'. > > I expected just one object is created. So what should i do? > > -- > Javi > > Ubuntu 8.04. sf 1.4 -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en