for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace AppBundle\Repository;
use Symfony\Bridge\Doctrine\Security\User\UserLoaderInterface;
/**
* UserInternRepository.
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class UserInternRepository extends \Doctrine\ORM\EntityRepository implements UserLoaderInterface
{
public function loadUserByUsername($username)
return $this->createQueryBuilder('user')
->andWhere('user.apiToken = :username')
->setParameter('username', $username)
->getQuery()
->getOneOrNullResult();
}