G Pas
This commit is contained in:
parent
9cfc977dda
commit
fb07ee9019
2 changed files with 9 additions and 3 deletions
|
@ -54,12 +54,16 @@ func handleLostPassword(w http.ResponseWriter, r *http.Request) {
|
|||
if err != nil {
|
||||
log.Printf(fmt.Sprintf("handleLostPassword : %v %v", err, l))
|
||||
}
|
||||
data := LostPasswordData{}
|
||||
data := LostPasswordData{
|
||||
Username: "",
|
||||
Mail: "",
|
||||
OtherMailbox: "",
|
||||
}
|
||||
if r.Method == "POST" {
|
||||
r.ParseForm()
|
||||
data.Username = strings.TrimSpace(strings.Join(r.Form["username"], ""))
|
||||
data.Mail = strings.TrimSpace(strings.Join(r.Form["mail"], ""))
|
||||
data.OtherMailbox = strings.TrimSpace(strings.Join(r.Form["otherMailbox"], ""))
|
||||
data.OtherMailbox = strings.TrimSpace(strings.Join(r.Form["othermailbox"], ""))
|
||||
user := User{
|
||||
CN: data.Username,
|
||||
Mail: data.Mail,
|
||||
|
|
|
@ -29,5 +29,7 @@
|
|||
<label for="username">Mail de secours :</label>
|
||||
<input type="text" name="othermailbox" id="othermailbox" class="form-control" value="{{ .OtherMailbox }}" />
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Refaire son mal de passe</button>
|
||||
</form>
|
||||
<script src="/static/javascript/minio.js"></script>
|
||||
{{end}}
|
Loading…
Reference in a new issue