summaryrefslogtreecommitdiffstats
path: root/api4/user.go
diff options
context:
space:
mode:
Diffstat (limited to 'api4/user.go')
-rw-r--r--api4/user.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/api4/user.go b/api4/user.go
index 1c870f1c1..1d117ce07 100644
--- a/api4/user.go
+++ b/api4/user.go
@@ -111,7 +111,11 @@ func getUser(c *Context, w http.ResponseWriter, r *http.Request) {
if HandleEtag(etag, "Get User", w, r) {
return
} else {
- app.SanitizeProfile(user, c.IsSystemAdmin())
+ if c.Session.UserId == user.Id {
+ user.Sanitize(map[string]bool{})
+ } else {
+ app.SanitizeProfile(user, c.IsSystemAdmin())
+ }
w.Header().Set(model.HEADER_ETAG_SERVER, etag)
w.Write([]byte(user.ToJson()))
return