From 3d67d742424317d8945544a216d987eb121cfec0 Mon Sep 17 00:00:00 2001 From: Ryan Prather Date: Mon, 13 Jan 2025 22:17:22 +0000 Subject: [PATCH] added active and lastLogin properties --- src/Entity/User.php | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/Entity/User.php b/src/Entity/User.php index 2705d91..84d5f54 100644 --- a/src/Entity/User.php +++ b/src/Entity/User.php @@ -101,6 +101,12 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface #[ORM\Column(type: Types::TEXT, nullable: true)] private ?string $signature = null; + #[ORM\Column] + private ?bool $active = null; + + #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)] + private ?\DateTimeInterface $lastLogin = null; + public function __construct() { $this->userCases = new ArrayCollection(); @@ -454,4 +460,28 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface return $this; } + + public function isActive(): ?bool + { + return $this->active; + } + + public function setActive(bool $active): static + { + $this->active = $active; + + return $this; + } + + public function getLastLogin(): ?\DateTimeInterface + { + return $this->lastLogin; + } + + public function setLastLogin(?\DateTimeInterface $lastLogin): static + { + $this->lastLogin = $lastLogin; + + return $this; + } }