aboutsummaryrefslogtreecommitdiffstats
path: root/routers/user/profile.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/user/profile.go')
-rw-r--r--routers/user/profile.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/routers/user/profile.go b/routers/user/profile.go
index d63f84afd3..4c5cbf5081 100644
--- a/routers/user/profile.go
+++ b/routers/user/profile.go
@@ -271,9 +271,5 @@ func Action(ctx *context.Context) {
return
}
- redirectTo := ctx.Query("redirect_to")
- if len(redirectTo) == 0 {
- redirectTo = u.HomeLink()
- }
- ctx.Redirect(redirectTo)
+ ctx.RedirectToFirst(ctx.Query("redirect_to"), u.HomeLink())
}