From 00e2a57c291e306945d7fb1fe63555ad8d0be7f2 Mon Sep 17 00:00:00 2001 From: Chris Mann Date: Sat, 22 Jul 2023 13:46:26 +0200 Subject: [PATCH] Factoring the model user and correcting password --- invite.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invite.go b/invite.go index bd87086..0ad99dd 100644 --- a/invite.go +++ b/invite.go @@ -157,8 +157,8 @@ func handleNewAccount(w http.ResponseWriter, r *http.Request, l *ldap.Conn, invi newUser.SN = strings.TrimSpace(strings.Join(r.Form["surname"], "")) newUser.Mail = strings.TrimSpace(strings.Join(r.Form["mail"], "")) newUser.UID = strings.TrimSpace(strings.Join(r.Form["username"], "")) - newUser.CN = strings.TrimSpace(strings.Join(r.Form["CN"], "")) - newUser.DN = "cn=" + newUser.CN + "," + config.InvitationBaseDN + newUser.CN = strings.TrimSpace(strings.Join(r.Form["cn"], "")) + newUser.DN = "cn=" + strings.TrimSpace(strings.Join(r.Form["cn"], "")) + "," + config.InvitationBaseDN password1 := strings.Join(r.Form["password"], "") password2 := strings.Join(r.Form["password2"], "")