[TYPO3-mvc] addUsergroup in extended feUser

Lorenz Ulrich lorenz-typo3 at visol.ch
Fri Apr 13 12:01:02 CEST 2012


Hi Domi

I would do it the same way, except for:

 > $group = $feGroups->findByUid('4');

I'm not sure if it leads to problems, but I would pass an integer to 
findByUid, and not a string.

Did you check if you got a group?

Best regards,

Lorenz

Am 13.04.2012 04:07, schrieb Domi:
> Hello List,
>
> I struggling with adding usergroups to the extended fe_users table. I
> tried this:
>
> public function createAction(Tx_Intranet_Domain_Model_Client $newClient)
> {
>
> $feGroups = $this->frontendUserGroupRepository;
> $group = $feGroups->findByUid('4');
>
> $newClient->addUsergroup($group);
> $this->clientRepository->add($newClient);
>
> $this->flashMessageContainer->add('Your new Client was created.');
>
> $this->redirect('afterSubmit');
> }
>
> How do I rightly add / remove Relations from my domain model? There is
> no error given, it simply results into a white page, the line:
> $newClient->addUsergroup($group);
> breaks my code.
>
> Thanks!
>
> Dominic



More information about the TYPO3-project-typo3v4mvc mailing list