Skip to content

Commit

Permalink
Update hscontrol/types/users.go
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
kradalby and coderabbitai[bot] authored Aug 21, 2024
1 parent df9a74d commit ccbab98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hscontrol/types/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ type User struct {
// should be used throughout headscale, in information returned to the
// user and the Policy engine.
func (u *User) Username() string {
return cmp.Or(u.Email, u.Name, u.ProviderIdentifier, fmt.Sprintf("%d", u.ID))
return cmp.Or(u.Email, u.Name, u.ProviderIdentifier, strconv.FormatUint(uint64(u.ID), 10))
}

// DisplayNameOrUsername returns the DisplayName if it exists, otherwise
Expand Down

0 comments on commit ccbab98

Please sign in to comment.