We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4562d40 commit 4bd3b05Copy full SHA for 4bd3b05
routers/web/admin/users.go
@@ -209,7 +209,11 @@ func NewUserPost(ctx *context.Context) {
209
func prepareUserInfo(ctx *context.Context) *user_model.User {
210
u, err := user_model.GetUserByID(ctx.ParamsInt64(":userid"))
211
if err != nil {
212
- ctx.ServerError("GetUserByID", err)
+ if user_model.IsErrUserNotExist(err) {
213
+ ctx.Redirect(setting.AppSubURL + "/admin/users")
214
+ } else {
215
+ ctx.ServerError("GetUserByID", err)
216
+ }
217
return nil
218
}
219
ctx.Data["User"] = u
0 commit comments