mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-04 23:44:33 +02:00
Fixed static analysis issue and added test for UserRepository
This commit is contained in:
parent
c981476706
commit
b3153dac68
5 changed files with 117 additions and 3 deletions
|
@ -170,7 +170,7 @@ class SecurityController extends AbstractController
|
|||
$this->addFlash('success', 'pw_reset.new_pw.success');
|
||||
|
||||
$repo = $em->getRepository(User::class);
|
||||
$u = $repo->findOneBy(['name' => $data['username']]);
|
||||
$u = $repo->findByUsername($data['username']);
|
||||
$event = new SecurityEvent($u);
|
||||
/** @var EventDispatcher $eventDispatcher */
|
||||
$eventDispatcher->dispatch($event, SecurityEvents::PASSWORD_RESET);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue