aboutsummaryrefslogtreecommitdiff
path: root/routers/api/v1/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/api/v1/user.go')
-rw-r--r--routers/api/v1/user.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/api/v1/user.go b/routers/api/v1/user.go
index e9ba615f..a4648297 100644
--- a/routers/api/v1/user.go
+++ b/routers/api/v1/user.go
@@ -68,5 +68,10 @@ func GetUserInfo(ctx *middleware.Context) {
}
return
}
+
+ // Hide user e-mail when API caller isn't signed in.
+ if !ctx.IsSigned {
+ u.Email = ""
+ }
ctx.JSON(200, &api.User{u.Id, u.Name, u.FullName, u.Email, u.AvatarLink()})
}