try to fix display name

This commit is contained in:
soukainna 2023-02-15 11:22:18 +01:00
parent 57accbddbb
commit d3df781e33
1 changed files with 7 additions and 5 deletions

View File

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