diff options
Diffstat (limited to 'routers/user/setting_openid.go')
-rw-r--r-- | routers/user/setting_openid.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/routers/user/setting_openid.go b/routers/user/setting_openid.go index 5e6052d3ef..e33ab144ed 100644 --- a/routers/user/setting_openid.go +++ b/routers/user/setting_openid.go @@ -45,6 +45,12 @@ func SettingsOpenIDPost(ctx *context.Context, form auth.AddOpenIDForm) { ctx.Data["PageIsSettingsOpenID"] = true if ctx.HasError() { + openid, err := models.GetUserOpenIDs(ctx.User.ID) + if err != nil { + ctx.Handle(500, "GetUserOpenIDs", err) + return + } + ctx.Data["OpenIDs"] = openid ctx.HTML(200, tplSettingsOpenID) return } @@ -140,3 +146,13 @@ func DeleteOpenID(ctx *context.Context) { }) } +// ToggleOpenIDVisibility response for toggle visibility of user's openid +func ToggleOpenIDVisibility(ctx *context.Context) { + if err := models.ToggleUserOpenIDVisibility(ctx.QueryInt64("id")); err != nil { + ctx.Handle(500, "ToggleUserOpenIDVisibility", err) + return + } + + ctx.Redirect(setting.AppSubURL + "/user/settings/openid") +} + |