From fb07ee9019d7f7a2271f55f20455ecf684fe2e3d Mon Sep 17 00:00:00 2001 From: Chris Mann Date: Sun, 23 Jul 2023 08:34:06 +0200 Subject: [PATCH] G Pas --- invite.go | 8 ++++++-- templates/lost_password.html | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/invite.go b/invite.go index 4da8d31..da7eedc 100644 --- a/invite.go +++ b/invite.go @@ -54,12 +54,16 @@ func handleLostPassword(w http.ResponseWriter, r *http.Request) { if err != nil { log.Printf(fmt.Sprintf("handleLostPassword : %v %v", err, l)) } - data := LostPasswordData{} + data := LostPasswordData{ + Username: "", + Mail: "", + OtherMailbox: "", + } if r.Method == "POST" { r.ParseForm() data.Username = strings.TrimSpace(strings.Join(r.Form["username"], "")) data.Mail = strings.TrimSpace(strings.Join(r.Form["mail"], "")) - data.OtherMailbox = strings.TrimSpace(strings.Join(r.Form["otherMailbox"], "")) + data.OtherMailbox = strings.TrimSpace(strings.Join(r.Form["othermailbox"], "")) user := User{ CN: data.Username, Mail: data.Mail, diff --git a/templates/lost_password.html b/templates/lost_password.html index a959558..38f0707 100644 --- a/templates/lost_password.html +++ b/templates/lost_password.html @@ -29,5 +29,7 @@ - + + + {{end}} \ No newline at end of file