---+ USERNAME -- your login username Foswiki makes names available in three formats: USERNAME like =jsmith=, WIKINAME like =JohnSmith= and WIKIUSERNAME like =%USERSWEB%.JohnSmith=. Un-authenticated users are all %USERSWEB%.WikiGuest. This macro is an alias for the USERINFO macro with a fixed =format="$username"=. <div class="foswikiHelp">%X% The login username is considered "protected" information by default and will not be revealed to non-admin users.</div> ---++ Parameters | *Parameter* | *Description* | | ="name"= | WikiName or [[UserName][login username]]. | current user | ---++ Examples * =%<nop>USERNAME%= expands to =%USERNAME%= * =%<nop>USERNAME{AdminUser}%= expands to =%USERNAME{AdminUser}%= <div class="foswikiHelp">%X% When used in a template topic, this macro will be expanded when the template is used to create a new topic. See TemplateTopics#TemplateTopicsVars for details</div> %STOPINCLUDE% ---++ Related [[VarREMOTEUSER][REMOTE_USER]], [[VarUSERINFO][USERINFO]], [[VarWIKINAME][WIKINAME]], [[VarWIKIUSERNAME][WIKIUSERNAME]], UserAuthentication
This topic: System
>
Category
>
UserDocumentationCategory
>
Macros
>
VarUSERNAME
Topic revision:
15 Mar 2026,
UnknownUser
(raw view)
Copyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki?
Send feedback