Working on signup workfow
This commit is contained in:
parent
6be99fe3cb
commit
dd911ca11b
2 changed files with 5 additions and 3 deletions
|
@ -164,8 +164,10 @@ func modify(user User, config *ConfigFile, ldapConn *ldap.Conn) error {
|
|||
func passwd(user User, config *ConfigFile, ldapConn *ldap.Conn) error {
|
||||
passwordModifyRequest := ldap.NewPasswordModifyRequest(user.DN, "", user.Password)
|
||||
_, err := ldapConn.PasswordModify(passwordModifyRequest)
|
||||
log.Printf(fmt.Sprintf("passwd 162 : %v %v", err, ldapConn))
|
||||
log.Printf(fmt.Sprintf("passwd 163 : %v", user))
|
||||
if err != nil {
|
||||
log.Printf(fmt.Sprintf("model-user passwd : %v %v", err, ldapConn))
|
||||
log.Printf(fmt.Sprintf("model-user passwd : %v", user))
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ func handleNewAccount(w http.ResponseWriter, r *http.Request, l *ldap.Conn, invi
|
|||
newUser.SN = strings.TrimSpace(strings.Join(r.Form["surname"], ""))
|
||||
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["othermailbox"], ""))
|
||||
newUser.UID = strings.TrimSpace(strings.Join(r.Form["username"], ""))
|
||||
newUser.CN = strings.TrimSpace(strings.Join(r.Form["username"], ""))
|
||||
newUser.DN = "cn=" + strings.TrimSpace(strings.Join(r.Form["username"], "")) + "," + config.UserBaseDN
|
||||
|
||||
|
|
Loading…
Reference in a new issue