Trying a utility file
This commit is contained in:
parent
52569a4b08
commit
d7633797c2
1 changed files with 2 additions and 1 deletions
|
@ -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.SN = strings.TrimSpace(strings.Join(r.Form["surname"], ""))
|
||||||
newUser.UID = strings.TrimSpace(strings.Join(r.Form["username"], ""))
|
newUser.UID = strings.TrimSpace(strings.Join(r.Form["username"], ""))
|
||||||
newUser.Mail = strings.TrimSpace(strings.Join(r.Form["mail"], ""))
|
newUser.Mail = strings.TrimSpace(strings.Join(r.Form["mail"], ""))
|
||||||
|
newUser.DN = "cn=" + newUser.CN + "," + config.InvitationBaseDN
|
||||||
|
|
||||||
password1 := strings.Join(r.Form["password"], "")
|
password1 := strings.Join(r.Form["password"], "")
|
||||||
password2 := strings.Join(r.Form["password2"], "")
|
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
|
data.ErrorPasswordMismatch = true
|
||||||
} else {
|
} else {
|
||||||
newUser.Password = password2
|
newUser.Password = password2
|
||||||
addNewUser(newUser, config, login)
|
data.Success = addNewUser(newUser, config, login)
|
||||||
}
|
}
|
||||||
|
|
||||||
// tryCreateAccount(l, data, password1, password2, invitedBy)
|
// tryCreateAccount(l, data, password1, password2, invitedBy)
|
||||||
|
|
Loading…
Reference in a new issue