Revert "Fixed errors that query builder setParameters now expects an ArrayCollection instead of an array"

This reverts commit 78671b0bfe.
This commit is contained in:
Jan Böhmer 2024-06-10 00:04:22 +02:00
parent afb816cc41
commit 5eb29746af
2 changed files with 10 additions and 12 deletions

View file

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace App\Repository;
use App\Entity\UserSystem\User;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\NonUniqueResultException;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
@ -98,10 +97,10 @@ final class UserRepository extends NamedDBElementRepository implements PasswordU
->where('u.name = (:name)')
->orWhere('u.email = (:email)');
$qb->setParameters(new ArrayCollection([
$qb->setParameters([
'email' => $name_or_password,
'name' => $name_or_password,
]));
]);
try {
return $qb->getQuery()->getOneOrNullResult();