feat: move profile completeness check from login to booking flow entry

- Add profileComplete flag to User entity to avoid API calls
- Set flag during login (BpnAuthenticator) and profile save
- Check flag in IndexController when entering booking flow
- Remove ProfileCompletionSubscriber (no longer needed)

Users with incomplete profiles are only redirected when starting
a new booking, not on every login. Eliminates extra API call by
caching completeness status on the user entity.
This commit is contained in:
Björn Fromme
2026-03-16 12:02:59 +01:00
parent 7d3a63d744
commit c582e0820a
6 changed files with 76 additions and 114 deletions
+15
View File
@@ -35,6 +35,9 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
#[ORM\Column(type: 'datetime_immutable', nullable: true)]
private ?\DateTimeImmutable $lastLoginAt = null;
#[ORM\Column(type: 'boolean')]
private bool $profileComplete = false;
public function __construct(string $email)
{
$this->email = $email;
@@ -129,6 +132,18 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
return $this;
}
public function isProfileComplete(): bool
{
return $this->profileComplete;
}
public function setProfileComplete(bool $profileComplete): static
{
$this->profileComplete = $profileComplete;
return $this;
}
public function eraseCredentials(): void
{
}