[TYPO3-mvc] Magic method Tx_Extbase_Domain_Model_FrontendUser::findByUsergroup does not work?

François Suter fsu-lists at cobweb.ch
Wed Apr 27 16:19:27 CEST 2011


Hi all,

I tried to get a list of FE users for a given FE group. So I tried 
simply calling:

Tx_Extbase_Domain_Repository_FrontendUserRepository::findByUsergroup(group 
id or group object here)

does not give any result. I couldn't lay my hands on the exact SQL query 
being executed in the background (it's really hard to check what goes on 
under the hood with Extbase), but my guess is that it does an "=" 
comparison, which of course will fail on a comma-separated list of values.

I worked around this by extending the FE user repository and adding my 
own method which uses contains() and works fine. However I was wondering 
if the findByUsergroup() method should not be declared explicitly in 
Tx_Extbase_Domain_Repository_FrontendUserRepository and use contains().

Or did I miss something?

Cheers

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch


More information about the TYPO3-project-typo3v4mvc mailing list