Skip to content

Commit

Permalink
Merge pull request #1529 from rohantmp/userEmail
Browse files Browse the repository at this point in the history
feat(pro): use email as platform id when available
  • Loading branch information
FabianKramm authored Feb 8, 2024
2 parents 9ecda88 + b45fc18 commit de5c591
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/telemetry/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,11 @@ func GetPlatformUserID(self *managementv1.Self) string {
if cliconfig.GetConfig(log.Discard).TelemetryDisabled || self == nil {
return ""
}

return self.Status.Subject
platformID := self.Status.Subject
if self.Status.User != nil && self.Status.User.Email != "" {
platformID = self.Status.User.Email
}
return platformID
}

// GetPlatformInstanceID returns the loft instance id
Expand Down

0 comments on commit de5c591

Please sign in to comment.