diff --git a/api-users.go b/api-users.go index 3c29f2d..e865b27 100644 --- a/api-users.go +++ b/api-users.go @@ -53,6 +53,14 @@ func (app *appContext) NewUserFromAdmin(gc *gin.Context) { nu.Log() } + if emailEnabled && req.Email != "" { + emailStore := EmailAddress{ + Addr: req.Email, + Contact: true, + } + app.storage.SetEmailsKey(nu.User.ID, emailStore) + } + welcomeMessageSentIfNecessary := true if nu.Created { welcomeMessageSentIfNecessary = app.WelcomeNewUser(nu.User, time.Time{})