It looks like you need a plugin for this. Nothing complicated; just drop this:
from trac.wiki.macros import WikiMacroBase
class UserMacro(WikiMacroBase):
def expand_macro(self, formatter, name, args):
return formatter.req.authname;
In the file type <trac_env>/plugins/username.pyand add [[User]]to the wiki page. For unregistered users, it will show anonymous.
source
share