From d7633797c20965e7ce92ce8d2f1060ffb37cb846 Mon Sep 17 00:00:00 2001 From: Chris Mann Date: Thu, 20 Jul 2023 14:12:21 +0200 Subject: [PATCH] Trying a utility file --- invite.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/invite.go b/invite.go index bfcc150..55b33f8 100644 --- a/invite.go +++ b/invite.go @@ -131,6 +131,7 @@ func handleNewAccount(w http.ResponseWriter, r *http.Request, l *ldap.Conn, invi newUser.SN = strings.TrimSpace(strings.Join(r.Form["surname"], "")) newUser.UID = strings.TrimSpace(strings.Join(r.Form["username"], "")) newUser.Mail = strings.TrimSpace(strings.Join(r.Form["mail"], "")) + newUser.DN = "cn=" + newUser.CN + "," + config.InvitationBaseDN password1 := strings.Join(r.Form["password"], "") password2 := strings.Join(r.Form["password2"], "") @@ -140,7 +141,7 @@ func handleNewAccount(w http.ResponseWriter, r *http.Request, l *ldap.Conn, invi data.ErrorPasswordMismatch = true } else { newUser.Password = password2 - addNewUser(newUser, config, login) + data.Success = addNewUser(newUser, config, login) } // tryCreateAccount(l, data, password1, password2, invitedBy)