Thanks for the reply. I'm trying to display the username of the user that last modified the document at the top of the page using a portal engine template. I'm currently trying to display this using a transformation that is reused across most of the content.
When I put the above line into a transformation I get this on the page:
{% CurrentDocument.DocumentModifiedByUser %}
But I assume I'm using this in the wrong place, I had a look at 'Macro Rules' in the site manager but it appears to be for creating conditional rules.