1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-31 18:31:02 +00:00

Add a command to automatically tag all entries for a user

This commit is contained in:
Kévin Gomez 2015-10-24 15:11:06 +02:00
parent cad8cda7af
commit 625acf3352
9 changed files with 149 additions and 11 deletions

View file

@ -23,4 +23,19 @@ class UserRepository extends EntityRepository
->getQuery()
->getOneOrNullResult();
}
/**
* Find a user by its username.
*
* @param string $username
*
* @return User
*/
public function findOneByUserName($username)
{
return $this->createQueryBuilder('u')
->andWhere('u.username = :username')->setParameter('username', $username)
->getQuery()
->getSingleResult();
}
}