From c7606e4d25c9fda38c239f766fe363049e947b5e Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sat, 20 Apr 2024 20:57:27 -0500 Subject: [PATCH] Replace function name --- routers/web/auth/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/auth/auth.go b/routers/web/auth/auth.go index 72c4574729..60ce883873 100644 --- a/routers/web/auth/auth.go +++ b/routers/web/auth/auth.go @@ -390,7 +390,7 @@ func getUserName(gothUser *goth.User) (string, error) { switch setting.OAuth2Client.Username { case setting.OAuth2UsernamePreferredUsername: username := gothUser.RawData["preferred_username"].(string) - if strings.containsAny(username, "@") { + if strings.Contains(username, "@") { return user_model.NormalizeUserName(strings.Split(username, "@")[0]) } return user_model.NormalizeUserName(username)