Fixed Change Password Bug
This commit is contained in:
parent
73f0b98adc
commit
f65319fd93
2 changed files with 12 additions and 17 deletions
22
home.go
22
home.go
|
@ -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)
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue