(c *context.Context)
| 37 | } |
| 38 | |
| 39 | func NewUser(c *context.Context) { |
| 40 | c.Data["Title"] = c.Tr("admin.users.new_account") |
| 41 | c.Data["PageIsAdmin"] = true |
| 42 | c.Data["PageIsAdminUsers"] = true |
| 43 | |
| 44 | c.Data["login_type"] = "0-0" |
| 45 | |
| 46 | sources, err := database.Handle.LoginSources().List(c.Req.Context(), database.ListLoginSourceOptions{}) |
| 47 | if err != nil { |
| 48 | c.Error(err, "list login sources") |
| 49 | return |
| 50 | } |
| 51 | c.Data["Sources"] = sources |
| 52 | |
| 53 | c.Data["CanSendEmail"] = conf.Email.Enabled |
| 54 | c.Success(tmplAdminUserNew) |
| 55 | } |
| 56 | |
| 57 | func NewUserPost(c *context.Context, f form.AdminCrateUser) { |
| 58 | c.Data["Title"] = c.Tr("admin.users.new_account") |
nothing calls this directly
no test coverage detected