mirror of
https://github.com/juanfont/headscale.git
synced 2024-09-20 15:26:35 +08:00
Update hscontrol/types/users.go
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
parent
25a206d1c5
commit
e78aaa85ac
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue