diff --git a/modules/auth/user.go b/modules/auth/user.go index 215cffedb0..4059edfdd3 100644 --- a/modules/auth/user.go +++ b/modules/auth/user.go @@ -20,6 +20,9 @@ func SignedInId(session sessions.Session) int64 { return 0 } if s, ok := userId.(int64); ok { + if _, err := models.GetUserById(s); err != nil { + return 0 + } return s } return 0 diff --git a/templates/user/signup.tmpl b/templates/user/signup.tmpl index cfbf27fd93..ba41b0c9bb 100644 --- a/templates/user/signup.tmpl +++ b/templates/user/signup.tmpl @@ -7,7 +7,7 @@