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:
parent
9ee7c61bda
commit
afdff2e51b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user