[Flow] Creating Account and own object at once
David Sporer
david.sporer at gmail.com
Wed Jul 2 09:22:04 CEST 2014
Hi Daniel,
yes from my understanding this stays in your Controller.
You can access the password and username by adding them as parameters to
your Action (this is what I did - don't blame me if there's a better way
;-)).
Means like this:
/**
*
* @param dto $dto
* @param string $username
* @param string $password
*
*/
createAccountAction($dto, $username, $password)
And in your fluid form:
<f:form.textfield name="username" id="username" />
<f:form.password name="password" id="pass" />
I think you could also add username and password to your dto then you don't
have to add additional parameters to your action. But both should work.
Regards
David
2014-07-01 10:54 GMT+02:00 Daniel Völkel <d.voelkel at medienwuerfel.de>:
> Ok, now I have my DTO and my controller. There is just one thing I'm
> confused about: where do I create my account with
> $account = $this->accountFactory->createAccountWithPassword($username,
> $password, array($role));
>
> Will this part remain in my controller or will it be in my DTO? And how do
> I access username and password from my form:
>
> <f:form.textfield name="account.username" id="username" />
> <f:form.password name="account.pass" id="pass" />
>
> Best regards,
> Daniel
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>
More information about the Flow
mailing list