diff --git a/routers/api/v1/user/user.go b/routers/api/v1/user/user.go index 0453a455f..49e5f3413 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 } }