1
0
mirror of https://github.com/volatiletech/authboss.git synced 2025-01-06 03:54:17 +02:00

Add missing field preservation.

This commit is contained in:
Kris Runzer 2015-04-10 14:07:15 -07:00
parent 9ee7c61bda
commit afdff2e51b

View File

@ -121,6 +121,11 @@ func (reg *Register) registerPostHandler(ctx *authboss.Context, w http.ResponseW
"primaryIDValue": key,
"errs": map[string][]string{reg.PrimaryID: []string{"Already in use"}},
}
for _, f := range reg.PreserveFields {
data[f], _ = ctx.FirstFormValue(f)
}
return reg.templates.Render(ctx, w, r, tplRegister, data)
} else if err != nil {
return err