我需要访问此特殊用户存储库中的容器。我不确定如何在不跳过UserProviderInterface的情况下执行此操作。谢谢你的帮助!
class UserRepository extends EntityRepository implements UserProviderInterface
{
public function loadUserByUsername($username)
{
//the container provide the $tenantID, which I need for my query
$q = $this
->createQueryBuilder('u')
->where('u.tenantid = :tenantid AND u.email = :email')
->setParameter('tenantid', $tenantId)
->setParameter('email', $username)
->getQuery();
try {......
return $user;
}