Foswiki makes names available in three formats: USERNAME like jsmith, WIKINAME like JohnSmith and WIKIUSERNAME like Main.JohnSmith. Un-authenticated users are all WikiGuest.
Examples
%USERNAME% expands to guest
When used in a template topic, this macro will be expanded when the template is used to create a new topic. See TemplateTopics for details