From aa098085e68cb1483d0e048e61ff32847bc5674f 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 de16a2d66d..b9ae67abad 100644 --- a/routers/web/auth/auth.go +++ b/routers/web/auth/auth.go @@ -372,7 +372,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