[TYPO3-mvc] No results from FE-User-Repository

Johannes Steu typo at motiv-sport.de
Thu Feb 23 23:45:14 CET 2012


Hello,

$this->userRepository->findByUid(3)

is working correctly and gives a User-Ojekt.
How can i get findAll() working correctly?

Regards,
Johannes


Am 23.02.2012 um 23:17 schrieb Johannes Steu:

> Hello,
> 
> I'm trying to get all User from one fe_groups, so i'm using a UserRepository. 
> My groupRepository works fine but i got problems with the UserRepository
> 
> The UserRepository:
> class Tx_FhdoRequest_Domain_Repository_UserRepository extends Tx_Extbase_Domain_Repository_FrontendUserRepository { }
> 
> TypoScript: 
> config.tx_extbase.persistence.classes {
>    Tx_FhdoRequest_Domain_Model_Group {
>        mapping {
>            tableName = fe_groups
>        }
>    }
>    Tx_FhdoRequest_Domain_Model_User {
>      mapping {
>        tableName = fe_users
>        recordType = Tx_Extbase_Domain_Model_FrontendUser
>      }
>    }
> }
> 
> My everything is set up like my GroupRepository witch works fine.
> When i'm trying to get a result with $userRepository->findAll(); my Browser loads very long time.
> var_dump ouput is like thounsands lines of code, starting with:
> 
> object(Tx_Extbase_Persistence_QueryResult)#370 (5) { ["warning":"Tx_Extbase_Persistence_QueryResult":private]=> string(206) "You should never see this warning. 
> 
> but i don't get the real user objects.
> 
> In the end i need all email adresses from all users of a given group. I made a method to get all Users:
> 
>    /**
>     * @param  $gui Usergroup ID
>     * @return array an array of objects
>     * 
>     */
>    public function findAllByUserGroup($gui){
>       $query = $this->createQuery();
>       $query->statement("SELECT * FROM fe_users WHERE usergroup LIKE '%".$gui.",%' OR usergroup LIKE '".$gui."' OR usergroup LIKE '%,".$gui."%'"); 
>       return $query->execute();
>    }
> 
> This Method isn't working right now. It's the same issue like in findAll();
> 
> Could anyone please help me out?
> 
> Regards,
> Johannes
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
> 



More information about the TYPO3-project-typo3v4mvc mailing list