Skip to content

Commit 1bf14e6

Browse files
authored
Merge pull request #323 from dotkernel/issue-322
Issue #322: Skip Doctrine cache on admin authentication
2 parents 3fb353d + 6e75a72 commit 1bf14e6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Admin/src/Adapter/AuthenticationAdapter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Admin\Admin\Entity\AdminIdentity;
99
use Admin\Admin\Entity\AdminRole;
1010
use Doctrine\ORM\EntityManager;
11+
use Doctrine\ORM\Exception\ORMException;
1112
use Dot\DependencyInjection\Attribute\Inject;
1213
use Exception;
1314
use Laminas\Authentication\Adapter\AdapterInterface;
@@ -64,6 +65,7 @@ private function getCredential(): string
6465

6566
/**
6667
* @throws Exception
68+
* @throws ORMException
6769
*/
6870
public function authenticate(): Result
6971
{
@@ -85,6 +87,7 @@ public function authenticate(): Result
8587
[$this->config['orm_default']['messages']['not_found']]
8688
);
8789
}
90+
$this->entityManager->refresh($identityClass);
8891

8992
$getCredential = "get" . ucfirst($this->config['orm_default']['credential_property']);
9093

0 commit comments

Comments
 (0)