diff --git a/app/handlers/signup.go b/app/handlers/signup.go index 22de2ef5e..acb744f84 100644 --- a/app/handlers/signup.go +++ b/app/handlers/signup.go @@ -121,6 +121,11 @@ func CreateTenant() web.HandlerFunc { c.Enqueue(tasks.SendWelcomeEmail(user.Name, user.Email, siteURL)) } + // Handle userlist. + if env.Config.UserList.Enabled { + c.Enqueue(tasks.UserListCreateCompany(*c.Tenant(), *user)) + } + return c.Ok(web.Map{}) } } @@ -190,11 +195,6 @@ func VerifySignUpKey() web.HandlerFunc { return c.Failure(err) } - // Handle userlist. - if env.Config.UserList.Enabled { - c.Enqueue(tasks.UserListCreateCompany(*c.Tenant(), *user)) - } - webutil.AddAuthUserCookie(c, user) c.Enqueue(tasks.SendWelcomeEmail(user.Name, user.Email, c.BaseURL()))