Fixed Change Password Bug

This commit is contained in:
Chris Mann 2023-07-25 14:27:58 +02:00
parent febfed7bee
commit 401bd0dac1
2 changed files with 4 additions and 9 deletions

View file

@ -78,6 +78,10 @@ func openNewUserLdap(config *ConfigFile) (*ldap.Conn, error) {
func handleLostPassword(w http.ResponseWriter, r *http.Request) {
templateLostPasswordPage := getTemplate("password_lost.html")
if checkLogin(w, r) != nil {
http.Redirect(w, r, "/", http.StatusTemporaryRedirect)
}
data := PasswordLostData{
CanAdmin: false,
LoggedIn: false,

View file

@ -59,15 +59,6 @@ type LoginFormData struct {
}
func handleLogin(w http.ResponseWriter, r *http.Request) *LoginInfo {
loginStatus := checkLogin(w, r)
if loginStatus != nil {
http.Redirect(w, r, "/home", http.StatusSeeOther)
return nil
// handleHome(w, r)
// return loginStatus.Info
}
templateLogin := getTemplate("login.html")
if r.Method == "GET" {