diff options
Diffstat (limited to 'routers/api/v1/user/user.go')
-rw-r--r-- | routers/api/v1/user/user.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/user/user.go b/routers/api/v1/user/user.go index bb1302077b..0639494c0e 100644 --- a/routers/api/v1/user/user.go +++ b/routers/api/v1/user/user.go @@ -104,7 +104,7 @@ func GetInfo(ctx *context.APIContext) { return } - ctx.JSON(200, convert.ToUser(u, ctx.IsSigned, ctx.User.ID == u.ID || ctx.User.IsAdmin)) + ctx.JSON(200, convert.ToUser(u, ctx.IsSigned, ctx.User != nil && (ctx.User.ID == u.ID || ctx.User.IsAdmin))) } // GetAuthenticatedUser get current user's information |