G Pas
This commit is contained in:
parent
4f6ed7f47a
commit
a3732c504b
2 changed files with 4 additions and 8 deletions
6
gpas.go
6
gpas.go
|
@ -24,13 +24,13 @@ func passwordLost(user User, config *ConfigFile, ldapConn *ldap.Conn) error {
|
|||
return errors.New("Il n'y a pas de quoi identifier l'utilisateur")
|
||||
}
|
||||
searchFilter := "(|"
|
||||
if user.CN == "" {
|
||||
if user.CN != "" {
|
||||
searchFilter += "(cn=" + user.CN + ")"
|
||||
}
|
||||
if user.Mail == "" {
|
||||
if user.Mail != "" {
|
||||
searchFilter += "(mail=" + user.Mail + ")"
|
||||
}
|
||||
if user.OtherMailbox == "" {
|
||||
if user.OtherMailbox != "" {
|
||||
searchFilter += "(carLicense=" + user.OtherMailbox + ")"
|
||||
}
|
||||
searchFilter += ")"
|
||||
|
|
|
@ -48,11 +48,7 @@ type LostPasswordData struct {
|
|||
|
||||
func handleLostPassword(w http.ResponseWriter, r *http.Request) {
|
||||
templateLostPasswordPage := getTemplate("lost_password.html")
|
||||
data := LostPasswordData{
|
||||
Username: "",
|
||||
Mail: "",
|
||||
OtherMailbox: "",
|
||||
}
|
||||
data := LostPasswordData{}
|
||||
l, err := ldapOpen(w)
|
||||
if err != nil {
|
||||
log.Printf(fmt.Sprintf("handleLostPassword : %v %v", err, l))
|
||||
|
|
Loading…
Reference in a new issue