aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle
diff options
context:
space:
mode:
authorJeremy Benoist <j0k3r@users.noreply.github.com>2015-12-06 14:31:26 +0100
committerJeremy Benoist <j0k3r@users.noreply.github.com>2015-12-06 14:31:26 +0100
commita7f1921f7db312b5def3839393357f443dcbb52c (patch)
tree0522e03891433e9fdc9eb64d52b2d9651aadf1f7 /src/Wallabag/UserBundle
parent2e15e30bf0e634bbbc3a9678904953d015490ed2 (diff)
parent752b90d1f2e279d3662d5431b09c7587df2937ca (diff)
downloadwallabag-a7f1921f7db312b5def3839393357f443dcbb52c.tar.gz
wallabag-a7f1921f7db312b5def3839393357f443dcbb52c.tar.zst
wallabag-a7f1921f7db312b5def3839393357f443dcbb52c.zip
Merge pull request #1478 from K-Phoen/rule-based-tags
Rule based tags
Diffstat (limited to 'src/Wallabag/UserBundle')
-rw-r--r--src/Wallabag/UserBundle/Repository/UserRepository.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Wallabag/UserBundle/Repository/UserRepository.php b/src/Wallabag/UserBundle/Repository/UserRepository.php
index c020f3ca..009c4881 100644
--- a/src/Wallabag/UserBundle/Repository/UserRepository.php
+++ b/src/Wallabag/UserBundle/Repository/UserRepository.php
@@ -23,4 +23,19 @@ class UserRepository extends EntityRepository
23 ->getQuery() 23 ->getQuery()
24 ->getOneOrNullResult(); 24 ->getOneOrNullResult();
25 } 25 }
26
27 /**
28 * Find a user by its username.
29 *
30 * @param string $username
31 *
32 * @return User
33 */
34 public function findOneByUserName($username)
35 {
36 return $this->createQueryBuilder('u')
37 ->andWhere('u.username = :username')->setParameter('username', $username)
38 ->getQuery()
39 ->getSingleResult();
40 }
26} 41}