user = $user; } public function getId(): int { return $this->user->ID; } public function getUser(): WP_User { return $this->user; } public function getEmail(): ?string { return $this->user->user_email ?: null; } public function exists(): bool { return $this->user->exists(); } /** @return string[] */ public function getRoles(): array { return $this->user->roles; } }