diff options
-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 0453a455f4..49e5f34136 100644 --- a/routers/api/v1/user/user.go +++ b/routers/api/v1/user/user.go @@ -60,7 +60,7 @@ func Search(ctx *context.APIContext) { AvatarURL: users[i].AvatarLink(), FullName: markup.Sanitize(users[i].FullName), } - if ctx.IsSigned { + if ctx.IsSigned && (!users[i].KeepEmailPrivate || ctx.User.IsAdmin) { results[i].Email = users[i].Email } } |