Remove address
Some checks failed
mirror / mirror (push) Has been skipped
testing / lint-backend (push) Successful in 8m4s
testing / checks-backend (push) Successful in 7m19s
testing / test-unit (push) Successful in 14m48s
testing / test-mysql (push) Failing after 31m13s
testing / test-pgsql (push) Failing after 23m32s
testing / test-sqlite (push) Successful in 29m20s

This commit is contained in:
Anthony Lawn 2024-02-03 12:28:27 -06:00
parent c767787740
commit aa098085e6

View file

@ -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