- ): static {
- $id = $token->getClaim($idClaim);
-
- return new self(
- externalId: $id,
- email: $token->getClaim('email'),
- name: static::getUserDisplayName($displayNameClaims, $token, $id),
- groups: static::getUserGroups($groupsClaim, $token),
- );
+ ): void {
+ $this->externalId = $claims->getClaim($idClaim) ?? $this->externalId;
+ $this->email = $claims->getClaim('email') ?? $this->email;
+ $this->name = static::getUserDisplayName($displayNameClaims, $claims) ?? $this->name;
+ $this->groups = static::getUserGroups($groupsClaim, $claims) ?? $this->groups;