mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-15 04:44:36 +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
|
@ -97,8 +97,7 @@ class PasswordResetManager
|
|||
{
|
||||
//Try to find the user
|
||||
$repo = $this->em->getRepository(User::class);
|
||||
/** @var User|null $user */
|
||||
$user = $repo->findOneBy(['name' => $username]);
|
||||
$user = $repo->findByUsername($username);
|
||||
|
||||
//If no user matching the name, show an error message
|
||||
if (!$user instanceof User) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue