diff options
Diffstat (limited to 'api4/user.go')
-rw-r--r-- | api4/user.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/api4/user.go b/api4/user.go index 14ab3a0a2..ac702644d 100644 --- a/api4/user.go +++ b/api4/user.go @@ -154,7 +154,11 @@ func getUserByUsername(c *Context, w http.ResponseWriter, r *http.Request) { if c.HandleEtag(etag, "Get User", w, r) { return } else { - c.App.SanitizeProfile(user, c.IsSystemAdmin()) + if c.Session.UserId == user.Id { + user.Sanitize(map[string]bool{}) + } else { + c.App.SanitizeProfile(user, c.IsSystemAdmin()) + } w.Header().Set(model.HEADER_ETAG_SERVER, etag) w.Write([]byte(user.ToJson())) return |