Fixed Change Password Bug

This commit is contained in:
Chris Mann 2023-07-25 14:34:19 +02:00
parent 73f0b98adc
commit f65319fd93
2 changed files with 12 additions and 17 deletions

22
home.go
View file

@ -18,16 +18,18 @@ func handleHome(w http.ResponseWriter, r *http.Request) {
login := checkLogin(w, r)
if login == nil {
handleLogin(w, r)
return
} else {
templateHome := getTemplate("home.html")
data := &HomePageData{
Login: login,
BaseDN: config.BaseDN,
Org: config.Org,
CanAdmin: login.CanAdmin,
LoggedIn: true,
}
templateHome.Execute(w, data)
}
templateHome := getTemplate("home.html")
data := &HomePageData{
Login: login,
BaseDN: config.BaseDN,
Org: config.Org,
CanAdmin: login.CanAdmin,
LoggedIn: true,
}
templateHome.Execute(w, data)
}

View file

@ -25,13 +25,6 @@ func checkLogin(w http.ResponseWriter, r *http.Request) *LoginStatus {
}
}
if login_info == nil {
login_info = handleLogin(w, r)
if login_info == nil {
return nil
}
}
l, err := ldapOpen(w)
if l == nil {
return nil