Factoring the model user and correcting password

This commit is contained in:
Chris Mann 2023-07-22 10:01:05 +02:00
parent 1e22377ca8
commit 60ddadbfc5
2 changed files with 2 additions and 1 deletions

View file

@ -134,6 +134,7 @@ func add(user User, config *ConfigFile, ldapConn *ldap.Conn) error {
}
func modify(user User, config *ConfigFile, ldapConn *ldap.Conn) error {
log.Printf("Modify User : %v", user)
modify_request := ldap.NewModifyRequest(user.DN, nil)
previousUser, err := get(user, config, ldapConn)
if err != nil {

View file

@ -56,7 +56,7 @@ func handleProfile(w http.ResponseWriter, r *http.Request) {
// Password: ,
}
if user.Mail != "" {
if user.DisplayName != "" {
err := modify(user, config, login.conn)
if err != nil {
data.ErrorMessage = "handleProfile : " + err.Error()