Save as "plugins/whoami.py"

from trac.wiki.macros import WikiMacroBase class WhoAmIMacro (WikiMacroBase): """ Usage: `[[WhoAmI]]` """ def render_macro ( self , formatter, name, content): user = formatter . req . authname return 'You are: ' + user