Add Terms and Conditions and marketing opt-in checkboxes to registration
Registration now requires agreeing to the Terms and Conditions and lets users opt in to hear about future projects. The opt-in is persisted on the user via a new marketing_opt_in column (migration included). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,9 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
#[ORM\Column(type: 'boolean')]
|
||||
private bool $isVerified = false;
|
||||
|
||||
#[ORM\Column(type: 'boolean')]
|
||||
private bool $marketingOptIn = false;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
@@ -137,4 +140,16 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isMarketingOptIn(): bool
|
||||
{
|
||||
return $this->marketingOptIn;
|
||||
}
|
||||
|
||||
public function setMarketingOptIn(bool $marketingOptIn): static
|
||||
{
|
||||
$this->marketingOptIn = $marketingOptIn;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user