Skip to content

Commit

Permalink
Issue #322: Skip Doctrine cache on admin authentication
Browse files Browse the repository at this point in the history
Signed-off-by: alexmerlin <[email protected]>
  • Loading branch information
alexmerlin committed Dec 11, 2024
1 parent 998a594 commit 00b4ff8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Admin/src/Adapter/AuthenticationAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Admin\Admin\Entity\AdminIdentity;
use Admin\Admin\Entity\AdminRole;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Exception\ORMException;
use Dot\DependencyInjection\Attribute\Inject;
use Exception;
use Laminas\Authentication\Adapter\AdapterInterface;
Expand Down Expand Up @@ -64,6 +65,7 @@ private function getCredential(): string

/**
* @throws Exception
* @throws ORMException
*/
public function authenticate(): Result
{
Expand All @@ -77,6 +79,7 @@ public function authenticate(): Result
$identityClass = $repository->findOneBy([
$this->config['orm_default']['identity_property'] => $this->getIdentity(),
]);
$this->entityManager->refresh($identityClass);

if (null === $identityClass) {
return new Result(
Expand Down

0 comments on commit 00b4ff8

Please sign in to comment.