[TYPO3-english] Tx_Extbase_Domain_Repository_FrontendUserRepository->findAll() working in 4.5.30?

Calgacus map Brude calgach at gmail.com
Thu Nov 21 21:55:12 CET 2013

I am trying to run a simple query off of the  Tx_Extbase_Domain_Repository_FrontendUserRepository.  I cannot get anything to work except findByUid(), not even findAll().

In my controller I have this code which seems to work:
     * @var Tx_Extbase_Domain_Repository_FrontendUserRepository 
    protected $userRepository;

     * Inject the user repository
     * @param Tx_Extbase_Domain_Repository_FrontendUserRepository $userRepository 
     * @return void */
    public function injectFrontendUserRepository(Tx_Extbase_Domain_Repository_FrontendUserRepository $userRepository) {
        $this->userRepository = $userRepository;

     * action create
     * @param Tx_BpsCoupons_Domain_Model_Coupon $newCoupon
     * @return void
    public function createAction(Tx_BpsCoupons_Domain_Model_Coupon $newCoupon) {
..... some code .....
  $user = $this->userRepository->findByUid(($GLOBALS['TSFE']->fe_user->user[uid]));
..... some code .....

but in another function I want to look up a user not by uid but by   a fe_users column called vipnumber (an int column) so I tried 
     * check to see if there is already a user with this vip number in the database
     * @param string $vip
     * @return bool
    public function isVipValid($vip) {
        echo "<br/>" . __FUNCTION__ . __LINE__ . "<br/>";
        echo "<br/>".$vip."<br/>";
        //$ret = $this->userRepository->findByUid(15); //this works!! but
        $query =  $this->userRepository->createQuery(); 
        $query->matching($query->equals('vip',$vip) ); 
        $ret = $query->execute(); //no luck
        and neither does this
        $ret = $this->userRepository->findAll();

How can one work but not the others?  In my setup I already put 
config.tx_extbase.persistence.classes.Tx_Extbase_Domain_Model_FrontendUser.mapping.recordType >
which seems to be necessary for the fiondByUid to work, is i t preventing the other from working?

I am using typo3 v 4.5.30 with extbase 1.3


More information about the TYPO3-english mailing list