From ffe2962dfa0fb9875b74144326d5db9d9feef442 Mon Sep 17 00:00:00 2001 From: Anthony Lawn Date: Sat, 3 Feb 2024 12:28:27 -0600 Subject: [PATCH] Remove address --- 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 1506b9540a..4719ee7e6c 100644 --- a/routers/web/auth/auth.go +++ b/routers/web/auth/auth.go @@ -377,7 +377,7 @@ func handleSignInFull(ctx *context.Context, u *user_model.User, remember, obeyRe } func getUserName(gothUser *goth.User) (string, error) { - return user_model.NormalizeUserName(gothUser.RawData["preferred_username"].(string)) + return user_model.NormalizeUserName(strings.Split(gothUser.RawData["preferred_username"].(string), "@")[0]) } // HandleSignOut resets the session and sets the cookies