diff --git a/routers/web/user/setting/notifications.go b/routers/web/user/setting/notifications.go index d78c7d666f..9e10568fa4 100644 --- a/routers/web/user/setting/notifications.go +++ b/routers/web/user/setting/notifications.go @@ -28,7 +28,6 @@ func Notifications(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("notifications") ctx.Data["PageIsSettingsNotifications"] = true ctx.Data["EmailNotificationsPreference"] = ctx.Doer.EmailNotificationsPreference - ctx.Data["EnableNotifyMail"] = setting.Service.EnableNotifyMail ctx.HTML(http.StatusOK, tplSettingsNotifications) } diff --git a/routers/web/web.go b/routers/web/web.go index b746c2b3d6..0b5d5bee15 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -686,7 +686,7 @@ func registerWebRoutes(m *web.Router) { m.Get("", user_setting.BlockedUsers) m.Post("", web.Bind(forms.BlockUserForm{}), user_setting.BlockedUsersPost) }) - }, reqSignIn, ctxDataSet("PageIsUserSettings", true, "EnablePackages", setting.Packages.Enabled)) + }, reqSignIn, ctxDataSet("PageIsUserSettings", true, "EnablePackages", setting.Packages.Enabled, "EnableNotifyMail", setting.Service.EnableNotifyMail)) m.Group("/user", func() { m.Get("/activate", auth.Activate)