fix: always update encrypted password

This avoids issues with changed passwords or encryption keys
This commit is contained in:
Björn Fromme
2025-04-25 08:15:45 +02:00
parent b6ac9fb362
commit d9ab2a6e1f
2 changed files with 4 additions and 4 deletions
+2 -1
View File
@@ -87,11 +87,12 @@ class BpnAuthenticator extends AbstractLoginFormAuthenticator implements Authent
$userRepository = $this->entityManager->getRepository(User::class);
if (null === $user = $userRepository->findOneBy(['email' => $email])) {
$user = new User($email, $encryptedPassword);
$user = new User($email);
$this->entityManager->persist($user);
}
$user
->setPassword($encryptedPassword)
->setPersonId($personId)
->setAddressId($addressId)
->setRoles($roles)