username = $username; $this->password = $password; $this->email = $email; } public function getId(): int { return $this->id; } public function getUsername() { return $this->username; } public function getPassword() { return $this->password; } public function getSalt() { // Salt is not needed when using Argon2i // @see https://symfony.com/doc/current/reference/configuration/security.html#using-the-argon2i-password-encoder return null; } public function getEmail(): string { return $this->email; } public function getRoles() { return ['ROLE_USER']; } public function eraseCredentials() { } /** @return Invite[]|ArrayCollection */ public function getInvites(): \Traversable { return $this->invites; } /** @see \Serializable::serialize() */ public function serialize() { return serialize([ $this->id, $this->username, $this->password, ]); } /** @see \Serializable::unserialize() */ public function unserialize($serialized) { list( $this->id, $this->username, $this->password ) = unserialize($serialized, ['allowed_classes' => false]); } }