I have a content type which has a full content and teaser display. It has a number of fields, and one of the fields on it is an Entity Reference field which references users (called field_registered_users with unlimited values allowed).
If a user views the node and they aren't referenced within the field then I want to hide certain fields on the node.
How do I do this? Should I do it in the template file or through a custom module? I also want to display a block on the page instead of the fields if this is the case.