This post has NOT been accepted by the mailing list yet.
You can get the local username using this line of code: $context.getLocalUser().
If u have a list of pages, and want to include the author of those pages...so the author will be different for some pages, i recomend looking at: Main.RecentChanges page.
All i tried so far was to get the date of the creation of a page:
#set($rcDoc = $xwiki.getDocument($subdoc))
#set($rcDt = $xwiki.jodatime.getDateTime($rcDoc.getDate().getTime()))
#set($documentDate = $xwiki.formatDate($rcDt.toDate(), "dd/MM/yyyy HH:mm:ss"))
Maybe getting the user is something similar. Good luck
This is after looking the page above.
I'm very new to xwiki. Thanks so far to everyone that is contributing...
I have created a new class. And I would like to include author as a property in the class, and have it automatically populate with the user's name.
I tried looking at comment class but couldn't see how this get's done.