form: fix contact details/profile application when using email
confirmation my rewrite of account-creation stuff had a massive oversight of email confirmation, the steps done after account creation (email and contact method storage, referral stuff) were not done on the email confirmation path. This has been factored out to PostNewUserFromIvnite, and the ConfirmationKeys store now includes the newUserDTO and the list of completeContactMethods.
This commit is contained in:
@@ -624,7 +624,7 @@ func (app *appContext) NewUserFromConfirmationKey(invite Invite, key string, lan
|
||||
"contactMessage": app.config.Section("ui").Key("contact_message").String(),
|
||||
})
|
||||
}
|
||||
var req newUserDTO
|
||||
var req ConfirmationKey
|
||||
if app.ConfirmationKeys == nil {
|
||||
fail()
|
||||
return
|
||||
@@ -666,8 +666,10 @@ func (app *appContext) NewUserFromConfirmationKey(invite Invite, key string, lan
|
||||
profile = &p
|
||||
}
|
||||
|
||||
// FIXME: Email and contract method linking?????
|
||||
|
||||
nu /*wg*/, _ := app.NewUserPostVerification(NewUserParams{
|
||||
Req: req,
|
||||
Req: req.newUserDTO,
|
||||
SourceType: sourceType,
|
||||
Source: source,
|
||||
ContextForIPLogging: gc,
|
||||
@@ -683,6 +685,8 @@ func (app *appContext) NewUserFromConfirmationKey(invite Invite, key string, lan
|
||||
}
|
||||
app.checkInvite(req.Code, true, req.Username)
|
||||
|
||||
app.PostNewUserFromInvite(nu, req, profile, invite)
|
||||
|
||||
jfLink := app.config.Section("ui").Key("redirect_url").String()
|
||||
if app.config.Section("ui").Key("auto_redirect").MustBool(false) {
|
||||
gc.Redirect(301, jfLink)
|
||||
|
||||
Reference in New Issue
Block a user