From 5ca2555b765405bfa80afeeca44b9e0edc9e4d53 Mon Sep 17 00:00:00 2001 From: Chris Mann Date: Sat, 22 Jul 2023 13:20:40 +0200 Subject: [PATCH] Factoring the model user and correcting password --- invite.go | 6 +++--- templates/invite_new_account.html | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/invite.go b/invite.go index e554f94..6585938 100644 --- a/invite.go +++ b/invite.go @@ -151,13 +151,13 @@ func handleNewAccount(w http.ResponseWriter, r *http.Request, l *ldap.Conn, invi newUser := User{} // login := checkLogin(w, r) - newUser.CN = fmt.Sprintf("%s@%s", strings.TrimSpace(strings.Join(r.Form["username"], "")), "lesgv.com") + // newUser.Mail = fmt.Sprintf("%s@%s", strings.TrimSpace(strings.Join(r.Form["username"], "")), "lesgv.com") newUser.DisplayName = strings.TrimSpace(strings.Join(r.Form["displayname"], "")) newUser.GivenName = strings.TrimSpace(strings.Join(r.Form["givenname"], "")) newUser.SN = strings.TrimSpace(strings.Join(r.Form["surname"], "")) - newUser.UID = strings.TrimSpace(strings.Join(r.Form["username"], "")) - newUser.OtherMailbox = strings.TrimSpace(strings.Join(r.Form["otherMailbox"], "")) 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["otherMailbox"], "")) newUser.DN = "cn=" + newUser.CN + "," + config.InvitationBaseDN password1 := strings.Join(r.Form["password"], "") diff --git a/templates/invite_new_account.html b/templates/invite_new_account.html index ca3ba1b..0e89a41 100644 --- a/templates/invite_new_account.html +++ b/templates/invite_new_account.html @@ -31,8 +31,8 @@
- - + + Le courriel de l'utilisateur. @@ -42,7 +42,7 @@
- + Votre identifiant doit ĂȘtre en minuscule.