aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Repository/AccessTokenRepository.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/ApiBundle/Repository/AccessTokenRepository.php')
-rw-r--r--src/Wallabag/ApiBundle/Repository/AccessTokenRepository.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Wallabag/ApiBundle/Repository/AccessTokenRepository.php b/src/Wallabag/ApiBundle/Repository/AccessTokenRepository.php
new file mode 100644
index 00000000..2b8d24df
--- /dev/null
+++ b/src/Wallabag/ApiBundle/Repository/AccessTokenRepository.php
@@ -0,0 +1,18 @@
1<?php
2
3namespace Wallabag\ApiBundle\Repository;
4
5use Doctrine\ORM\EntityRepository;
6
7
8class AccessTokenRepository extends EntityRepository
9{
10 public function findAppsByUser($userId)
11 {
12 $qb = $this->createQueryBuilder('a')
13 ->innerJoin('a.client', 'c')
14 ->addSelect('c')
15 ->where('a.user =:userId')->setParameter('userId', $userId);
16 return $qb->getQuery()->getResult();
17 }
18}