On 26.10.2010, at 01:09, Lukas Kahwe Smith wrote:
> Hi Thibault,
>
> What exactly is the purpose of UserController::createForm()?
> Seems like the method should probably be removed and the code adjusted to
> match the other controllers?
> Its definitely not good that it doesnt use the configured service.
>
> So at the very least it should be changed to be something like the following:
> protected function createForm($name, $object = null)
> {
> $form = $this['doctrine_user.user_form'];
> if (null === $object) {
> $userClass =
> $this['doctrine_user.user_repository']->getObjectClass();
> $object = new $userClass();
> }
>
> $form->setKey($name);
> $form->setData($object);
>
> return $form;
> }
Just FYI. I send the pull request:
http://github.com/knplabs/DoctrineUserBundle/pull/17
There are some other tweaks mixed in there too.
regards,
Lukas Kahwe Smith
[email protected]
--
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 developers" 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-devs?hl=en