diff options
author | Alex Auvolat <alex@adnab.me> | 2020-02-10 15:26:02 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-02-10 15:26:02 +0100 |
commit | e2e8a443ae0d5dbc72e4a5914af0cb3dad5e2a0b (patch) | |
tree | 634813b813e10cb387bd77846a83f44d2f8dea5d /profile.go | |
parent | 61a76f624decd9d9ef3afadaf584d46fe56e0817 (diff) | |
download | guichet-e2e8a443ae0d5dbc72e4a5914af0cb3dad5e2a0b.tar.gz guichet-e2e8a443ae0d5dbc72e4a5914af0cb3dad5e2a0b.zip |
Better tools for initial setup
Diffstat (limited to 'profile.go')
-rw-r--r-- | profile.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -35,10 +35,10 @@ func handleProfile(w http.ResponseWriter, r *http.Request) { if r.Method == "POST" { r.ParseForm() - data.Mail = strings.Join(r.Form["mail"], "") - data.DisplayName = strings.Join(r.Form["display_name"], "") - data.GivenName = strings.Join(r.Form["given_name"], "") - data.Surname = strings.Join(r.Form["surname"], "") + data.Mail = strings.TrimSpace(strings.Join(r.Form["mail"], "")) + data.DisplayName = strings.TrimSpace(strings.Join(r.Form["display_name"], "")) + data.GivenName = strings.TrimSpace(strings.Join(r.Form["given_name"], "")) + data.Surname = strings.TrimSpace(strings.Join(r.Form["surname"], "")) modify_request := ldap.NewModifyRequest(login.Info.DN, nil) modify_request.Replace("mail", []string{data.Mail}) |