diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-10-02 14:51:41 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2015-10-03 13:31:48 +0200 |
commit | 1210dae10589515d6f3824c75639342c5e1d52dd (patch) | |
tree | a26f0401a6f980f3ef96d3dc76ff3303b2943720 /src/Wallabag/UserBundle/Repository | |
parent | 772d8c4b93adc36baefda93ec37007e4a85321de (diff) | |
download | wallabag-1210dae10589515d6f3824c75639342c5e1d52dd.tar.gz wallabag-1210dae10589515d6f3824c75639342c5e1d52dd.tar.zst wallabag-1210dae10589515d6f3824c75639342c5e1d52dd.zip |
remove old implementation for login/register/recover
Diffstat (limited to 'src/Wallabag/UserBundle/Repository')
-rw-r--r-- | src/Wallabag/UserBundle/Repository/UserRepository.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/Wallabag/UserBundle/Repository/UserRepository.php b/src/Wallabag/UserBundle/Repository/UserRepository.php new file mode 100644 index 00000000..c020f3ca --- /dev/null +++ b/src/Wallabag/UserBundle/Repository/UserRepository.php | |||
@@ -0,0 +1,26 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\UserBundle\Repository; | ||
4 | |||
5 | use Doctrine\ORM\EntityRepository; | ||
6 | |||
7 | class UserRepository extends EntityRepository | ||
8 | { | ||
9 | /** | ||
10 | * Find a user by its username and rss roken. | ||
11 | * | ||
12 | * @param string $username | ||
13 | * @param string $rssToken | ||
14 | * | ||
15 | * @return User|null | ||
16 | */ | ||
17 | public function findOneByUsernameAndRsstoken($username, $rssToken) | ||
18 | { | ||
19 | return $this->createQueryBuilder('u') | ||
20 | ->leftJoin('u.config', 'c') | ||
21 | ->where('c.rssToken = :rss_token')->setParameter('rss_token', $rssToken) | ||
22 | ->andWhere('u.username = :username')->setParameter('username', $username) | ||
23 | ->getQuery() | ||
24 | ->getOneOrNullResult(); | ||
25 | } | ||
26 | } | ||