[FLOW3-general] Get a user from the userRepository

David Sporer david.sporer at gmail.com
Thu Dec 20 13:12:13 CET 2012


Hi,

if your User model extends the Person class this should be enough:

$myUser = $this->securityContext->getAccount()->getParty();

The party in this case should be your User object of the currently
logged in account.


Regards

David



2012/12/20 Sergio <naguib.mahfuz at gmail.com>

> Good morning,
>
> I was just trying to find a user in the userRepository by its electronic
> address on flow 1.1.
>
> I installed Party extension and everything is OK. My users extend Person
> class, and I did something like this in my user controller:
>
> $address =
>
> $this->securityContext->getAccount()->getParty()->getPrimaryElectronicAddress()->getUsage();
> $this->view->assign('users',
> $this->userRepository->findByPrimaryElectronicAddress($address));
>
> but this doesn't work.
> Any help would be appreciated.
>
> Thanks in advance,
> Sergio
> _______________________________________________
> FLOW3-general mailing list
> FLOW3-general at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow3-general
>


More information about the FLOW3-general mailing list