WCM tip #22: Content Search Web Part publishes user account names


When building content aggregations with users’ information Content Search Web Part publishes account names in page source.

As mentioned in the previous tip, Content Search Web Part outputs raw search results in the page source which is then rendered in browser using JavaScript-based Display Templates. When building content aggregations that use user information, such as author or modified by, if that user information is retrieved from a Managed Property of type user (usually the name of such property ends with OWSUSER), in the page source you will find the account name of this particular user. Particularly on public-facing websites you might not be comfortable with disclosing such information publicly. You can avoid this behavior by either using a Managed Property mapped to a text field rather than user field or by using server-side rendering and process the raw search results before they are sent to the browser.

Others found also helpful: