From d3df781e33b2ee35553811baddf1df11fe8e1586 Mon Sep 17 00:00:00 2001 From: soukainna Date: Wed, 15 Feb 2023 11:22:18 +0100 Subject: [PATCH] try to fix display name --- handlers/auth/onboarding.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/handlers/auth/onboarding.go b/handlers/auth/onboarding.go index f1c87a5..20a3982 100644 --- a/handlers/auth/onboarding.go +++ b/handlers/auth/onboarding.go @@ -37,7 +37,7 @@ func (h *AuthHandler) Onboarding(w http.ResponseWriter, r *http.Request) { if onboardingmap["admin"].(bool) { groups = append(groups, onboardingmap["group"].(string)+":admin") } - + display_name := fmt.Sprint(r.FormValue("first_name")) + " " + fmt.Sprint(r.FormValue("last_name")) account := &ma.Account{ Authentication: ma.AccountAuth{ Local: ma.LocalAuth{ @@ -46,11 +46,13 @@ func (h *AuthHandler) Onboarding(w http.ResponseWriter, r *http.Request) { }, }, Namespace: "parcoursmob", + Data: map[string]any{ - "first_name": r.FormValue("first_name"), - "last_name": r.FormValue("last_name"), - "email": onboardingmap["username"], - "groups": groups, + "display_name": display_name, + "first_name": r.FormValue("first_name"), + "last_name": r.FormValue("last_name"), + "email": onboardingmap["username"], + "groups": groups, }, }