summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/user/user.go')
-rw-r--r--routers/api/v1/user/user.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/user/user.go b/routers/api/v1/user/user.go
index 2e4ae273e5..76b4fc8dcc 100644
--- a/routers/api/v1/user/user.go
+++ b/routers/api/v1/user/user.go
@@ -67,7 +67,7 @@ func Search(ctx *context.APIContext) {
results := make([]*api.User, len(users))
for i := range users {
- results[i] = convert.ToUser(users[i], ctx.IsSigned, ctx.User.IsAdmin)
+ results[i] = convert.ToUser(users[i], ctx.IsSigned, ctx.User != nil && ctx.User.IsAdmin)
}
ctx.JSON(200, map[string]interface{}{