Fixed Change Password Bug
This commit is contained in:
parent
febfed7bee
commit
401bd0dac1
2 changed files with 4 additions and 9 deletions
|
@ -78,6 +78,10 @@ func openNewUserLdap(config *ConfigFile) (*ldap.Conn, error) {
|
||||||
|
|
||||||
func handleLostPassword(w http.ResponseWriter, r *http.Request) {
|
func handleLostPassword(w http.ResponseWriter, r *http.Request) {
|
||||||
templateLostPasswordPage := getTemplate("password_lost.html")
|
templateLostPasswordPage := getTemplate("password_lost.html")
|
||||||
|
if checkLogin(w, r) != nil {
|
||||||
|
http.Redirect(w, r, "/", http.StatusTemporaryRedirect)
|
||||||
|
}
|
||||||
|
|
||||||
data := PasswordLostData{
|
data := PasswordLostData{
|
||||||
CanAdmin: false,
|
CanAdmin: false,
|
||||||
LoggedIn: false,
|
LoggedIn: false,
|
||||||
|
|
9
login.go
9
login.go
|
@ -59,15 +59,6 @@ type LoginFormData struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleLogin(w http.ResponseWriter, r *http.Request) *LoginInfo {
|
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")
|
templateLogin := getTemplate("login.html")
|
||||||
|
|
||||||
if r.Method == "GET" {
|
if r.Method == "GET" {
|
||||||
|
|
Loading…
Reference in a new issue