false])] #[Assert\Type(type: 'boolean')] #[Assert\NotNull] private $informationRetainedAndUsed = false; /** * @var bool */ #[ORM\Column(type: 'boolean', options: ['default' => false])] #[Assert\Type(type: 'boolean')] #[Assert\NotNull] private $cgu = false; /** * Random string sent to the user email address in order to verify it * * @var string */ #[ORM\Column(name: 'confirmation_token', type: 'string', nullable: false)] private $confirmationToken; /** * @var \DateTime */ #[ORM\Column(type: 'datetime', nullable: false)] private $tokenGivenDate; public function __construct() { } /** * Sets id. * * @param int $id * * @return $this */ public function setId($id) { $this->id = $id; return $this; } /** * Gets id. * * @return int */ public function getId() { return $this->id; } /** * Sets organization. * * @param Organization $organization * * @return $this */ public function setOrganization(Organization $organization = null) { $this->organization = $organization; return $this; } /** * Gets organization. * * @return Organization */ public function getOrganization() { return $this->organization; } /** * Sets mail. * * @param string $mail * * @return $this */ public function setMail($mail) { $this->mail = $mail; return $this; } /** * Gets mail. * * @return string */ public function getMail() { return $this->mail; } /** * Sets username. * * @param string $username * * @return $this */ public function setUsername($username) { $this->username = $username; return $this; } /** * Gets username. * * @return string */ public function getUsername() { return $this->username; } /** * Sets password. * * @param string $password * * @return $this */ public function setPassword($password) { $this->password = $password; return $this; } /** * Gets password. * * @return string */ public function getPassword() { return $this->password; } /** * Sets confirmation token. * * @param string $token * * @return $this */ public function setConfirmationToken($token) { $this->confirmationToken = $token; return $this; } /** * Gets confirmation token. * * @return string */ public function getConfirmationToken() { return $this->confirmationToken; } /** * set token given date * @param \DateTime $tokenGivenDate * @return $this */ public function setTokenGivenDate(\DateTime $tokenGivenDate) { $this->tokenGivenDate = $tokenGivenDate; return $this; } /** * Gets token given date * * @return \DateTime */ public function getTokenGivenDate() { return $this->tokenGivenDate; } public function isTokenNonExpired($ttl) { return $this->getTokenGivenDate() instanceof \DateTime && $this->getTokenGivenDate()->getTimestamp() + $ttl > time(); } /** * Set name * * @param string $name * * @return AccessTmp */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Set givenName * * @param string $givenName * * @return AccessTmp */ public function setGivenName($givenName) { $this->givenName = $givenName; return $this; } /** * Get givenName * * @return string */ public function getGivenName() { return $this->givenName; } /** * Set birthDate * * @param \DateTime $birthDate * * @return AccessTmp */ public function setBirthDate($birthDate) { $this->birthDate = $birthDate; return $this; } /** * Get birthDate * * @return \DateTime */ public function getBirthDate() { return $this->birthDate; } /** * Set informationRetainedAndUsed * * @param boolean $informationRetainedAndUsed * * @return AccessTmp */ public function setInformationRetainedAndUsed($informationRetainedAndUsed) { $this->informationRetainedAndUsed = $informationRetainedAndUsed; return $this; } /** * Get informationRetainedAndUsed * * @return boolean */ public function getInformationRetainedAndUsed() { return $this->informationRetainedAndUsed; } /** * Set cgu * * @param boolean $cgu * * @return AccessTmp */ public function setCgu($cgu) { $this->cgu = $cgu; return $this; } /** * Get cgu * * @return boolean */ public function getCgu() { return $this->cgu; } }