diff --git a/gitea-group-sync.go b/gitea-group-sync.go index 9cf241b..8c686b9 100644 --- a/gitea-group-sync.go +++ b/gitea-group-sync.go @@ -18,8 +18,8 @@ func AddUsersToTeam(apiKeys GiteaKeys, users []Account, team int) bool { for i := 0; i < len(users); i++ { - fullusername := url.PathEscape(fmt.Sprintf("%s", users[i].Full_name)) - apiKeys.Command = "/api/v1/users/search?q=" + fullusername + "&access_token=" + userlogin := url.PathEscape(fmt.Sprintf("%s", users[i].Login)) + apiKeys.Command = "/api/v1/users/search?q=" + userlogin + "&access_token=" foundUsers := RequestSearchResults(apiKeys) for j := 0; j < len(foundUsers.Data); j++ {