From ccbab980043a1d686388198f94b61c0536b9ef3e Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Wed, 21 Aug 2024 08:16:23 +0200 Subject: [PATCH] Update hscontrol/types/users.go Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- hscontrol/types/users.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hscontrol/types/users.go b/hscontrol/types/users.go index 7a450daf7b..a5e18be932 100644 --- a/hscontrol/types/users.go +++ b/hscontrol/types/users.go @@ -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