1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-11-08 19:30:10 +00:00

admin: store email on manual account creation

another mistake from the rewrite of account creation stuff. Should fix
issue #374, sorry for taking so long.
This commit is contained in:
Harvey Tindall 2024-11-05 22:53:09 +00:00
parent 11eb907ced
commit da4470bc4f
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2

View File

@ -53,6 +53,14 @@ func (app *appContext) NewUserFromAdmin(gc *gin.Context) {
nu.Log() nu.Log()
} }
if emailEnabled && req.Email != "" {
emailStore := EmailAddress{
Addr: req.Email,
Contact: true,
}
app.storage.SetEmailsKey(nu.User.ID, emailStore)
}
welcomeMessageSentIfNecessary := true welcomeMessageSentIfNecessary := true
if nu.Created { if nu.Created {
welcomeMessageSentIfNecessary = app.WelcomeNewUser(nu.User, time.Time{}) welcomeMessageSentIfNecessary = app.WelcomeNewUser(nu.User, time.Time{})