Factoring the model user and correcting password
This commit is contained in:
parent
b91d2d4f9c
commit
0ffa7a155a
1 changed files with 9 additions and 10 deletions
19
profile.go
19
profile.go
|
@ -63,17 +63,16 @@ func handleProfile(w http.ResponseWriter, r *http.Request) {
|
||||||
} else {
|
} else {
|
||||||
data.Success = true
|
data.Success = true
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
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
|
|
||||||
}
|
}
|
||||||
|
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
|
||||||
|
|
||||||
/*
|
/*
|
||||||
visible := strings.TrimSpace(strings.Join(r.Form["visibility"], ""))
|
visible := strings.TrimSpace(strings.Join(r.Form["visibility"], ""))
|
||||||
|
|
Loading…
Reference in a new issue