diff options
author | Kévin Gomez <contact@kevingomez.fr> | 2015-10-24 15:11:06 +0200 |
---|---|---|
committer | Kévin Gomez <contact@kevingomez.fr> | 2015-11-11 16:27:19 +0100 |
commit | 625acf335298186b4ff983f9321900d1238e854b (patch) | |
tree | bc3149d9cee320429475ced6a1cb8b53c71ad7eb /src/Wallabag/UserBundle | |
parent | cad8cda7af06234a63b86253da1d813e7b0fd0f2 (diff) | |
download | wallabag-625acf335298186b4ff983f9321900d1238e854b.tar.gz wallabag-625acf335298186b4ff983f9321900d1238e854b.tar.zst wallabag-625acf335298186b4ff983f9321900d1238e854b.zip |
Add a command to automatically tag all entries for a user
Diffstat (limited to 'src/Wallabag/UserBundle')
-rw-r--r-- | src/Wallabag/UserBundle/Repository/UserRepository.php | 15 |
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 | } |