public function getUserApplications($userId, $limit = null)
    {
        $qb = $this->createQueryBuilder(null)
            ->field('user')->equals($userId)
            ->sort(['date' => -1]);
    
        if (isset($limit)) {
            $qb->limit($limit);
        }
    
        return $qb->getQuery()->execute();
    }
public function getUserApplications($userId, $limit = null)
    {
        $qb = $this->createQueryBuilder(null)
            ->field('user')->equals($userId)
            ->sort(['date' => -1]);
    
        if (isset($limit)) {
            $qb->limit($limit);
        }
    
        return $qb->getQuery()->execute();
    }
public function getUserApplications ( $ userId , $ limit = null ) { $ qb = $ this -> createQueryBuilder ( null ) -> field ( 'user' ) -> equals ( $ userId ) -> sort ( [ 'date' => - 1 ] ) ; if ( isset ( $ limit ) ) { $ qb -> limit ( $ limit ) ; } return $ qb -> getQuery ( ) -> execute ( ) ; }
Get applications for given user ID

@param string $userId
@param int $limit
@return Cursor
@since 0.27
Get applications for given user ID