Factoring the model user and correcting password

This commit is contained in:
Chris Mann 2023-07-22 09:55:10 +02:00
parent 2f68cfda0a
commit 9a31439aca

View file

@ -64,14 +64,15 @@ func handleProfile(w http.ResponseWriter, r *http.Request) {
data.Success = true
}
} else {
user, _ = get(User{
DN: login.Info.DN
}, config, login.conn)
data.DisplayName = user.DisplayName
data.GivenName = user.GivenName
data.Surname = user.SN
data.Description = user.Description
data.Mail = user.Mail
findUser, err := get(user, config, login.conn)
if err != nil {
data.ErrorMessage = "handleProfile : " + err.Error()
}
data.DisplayName = findUser.DisplayName
data.GivenName = findUser.GivenName
data.Surname = findUser.SN
data.Description = findUser.Description
data.Mail = findUser.Mail
}
/*