aboutsummaryrefslogtreecommitdiff
path: root/profile.go
diff options
context:
space:
mode:
Diffstat (limited to 'profile.go')
-rw-r--r--profile.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/profile.go b/profile.go
index fa372bc..e5da091 100644
--- a/profile.go
+++ b/profile.go
@@ -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})