Factoring the model user and correcting password
This commit is contained in:
parent
1e22377ca8
commit
60ddadbfc5
2 changed files with 2 additions and 1 deletions
|
@ -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 {
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue