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 535a49d766..8c57b1f099 100644
--- a/routers/api/v1/user/user.go
+++ b/routers/api/v1/user/user.go
@@ -103,7 +103,7 @@ func GetInfo(ctx *context.APIContext) {
return
}
- if !u.IsVisibleToUser(ctx.User) {
+ if !models.IsUserVisibleToViewer(u, ctx.User) {
// fake ErrUserNotExist error message to not leak information about existence
ctx.NotFound("GetUserByName", models.ErrUserNotExist{Name: ctx.Params(":username")})
return