TWiki Variables » Search » Category: Users & Authentication
Variables in this category:
- AUTHREALM -- authentication realm
- BUBBLESIG -- show bubble box and user signature with profile picture icon
- LOGIN -- present a full login link to non-authenticated user
- LOGINURL -- present a login link
- LOGOUT -- present a full logout link to authenticated user
- LOGOUTURL -- present a logout link
- REMOTE_USER -- environment variable
- SESSIONID -- unique ID for this session
- SESSION_VARIABLE -- get, set or clear a session variable
- USERINFO{"name"} -- retrieve details about a user
- USERNAME -- your login username
- USERREPORT -- show user reports with profile pictures
- USERSIG -- show user signature with profile picture icon
- WIKINAME -- your Wiki username
- WIKIUSERNAME -- your Wiki username with web prefix
- WIKIUSERSTOPIC -- name of topic listing all registers users
AUTHREALM -- authentication realm
- String defined as {AuthRealm} in configure. This is used in certain password encodings, and in login templates as part of the login prompt.
- Syntax:
%AUTHREALM%
- Expands to: Enter your LoginName. (Typically First name and last name, no space, no dots, capitalized, e.g. JohnSmith, unless you chose otherwise). Visit TWikiRegistration if you do not have one.
- Category: AdministrationVariables, SecurityAndAccessControlVariables, UsersAndAuthenticationVariables
- Related: TWikiUserAuthentication, SESSIONID, SESSIONVAR, LOGIN, LOGOUT, SESSION_VARIABLE (this topic)
BUBBLESIG -- show bubble box and user signature with profile picture icon
- Syntax:
%BUBBLESIG{WikiName}%
or%BUBBLESIG{WikiName - YYYY-MM-DD}%
- The parameter can be either just the WikiName of a user, or by convention the WikiName followed by a dash and the date
- Example:
-- %BUBBLESIG{TWikiGuest - 2025-10-09}%
- Expands to:
--TWiki Guest - 2025-10-09
- Category: EditingAndContentUpdateVariables, FormattingAndRenderingVariables, UsersAndAuthenticationVariables
- Related: USERREPORT, USERSIG, UserList, UserReports (this topic)
LOGIN -- present a full login link to non-authenticated user
- Present a login link only to users that are not logged in
- Syntax:
%LOGIN%
- Expand to: Log In
- Category: LinkingAndNavigationVariables, UsersAndAuthenticationVariables
- Related: TWikiUserAuthentication, LOGINURL, LOGOUT, LOGOUTURL, SESSIONID, SESSIONVAR, SESSION_VARIABLE (this topic)
LOGINURL -- present a login link
- Present a login link, regardless of the state of login
- Syntax:
%LOGINURL%
- Expand to:
/do/login/TWiki/UsersAndAuthenticationVariables?origurl=/do/view/TWiki/UsersAndAuthenticationVariables%3fsortcol%3d1%26table%3d1%26up%3d0
- Category: LinkingAndNavigationVariables, UsersAndAuthenticationVariables
- Related: TWikiUserAuthentication, LOGIN, LOGOUT, LOGOUTURL, SESSIONID, SESSIONVAR, SESSION_VARIABLE (this topic)
LOGOUT -- present a full logout link to authenticated user
- Present a logout link only to logged in users
- Syntax:
%LOGOUT%
- Expand to:
- Category: LinkingAndNavigationVariables, UsersAndAuthenticationVariables
- Related: TWikiUserAuthentication, LOGIN, LOGINURL, LOGOUTURL, SESSIONID, SESSIONVAR, SESSION_VARIABLE (this topic)
LOGOUTURL -- present a logout link
- Present a logout link, regardless of the state of login
- Syntax:
%LOGOUTURL%
- Expand to:
/do/view/TWiki/UsersAndAuthenticationVariables?logout=1
- Category: LinkingAndNavigationVariables, UsersAndAuthenticationVariables
- Related: TWikiUserAuthentication, LOGIN, LOGINURL, LOGOUT, SESSIONID, SESSIONVAR, SESSION_VARIABLE (this topic)
REMOTE_USER -- environment variable
- Syntax:
%REMOTE_USER%
- Expands to:
- Category: DevelopmentVariables, SystemInformationVariables, UsersAndAuthenticationVariables
- Related: ENV, HTTP_HOST, REMOTE_ADDR, REMOTE_PORT, USERNAME, WIKINAME, WIKIUSERNAME (this topic)
SESSIONID -- unique ID for this session
- Syntax:
%SESSIONID%
- Expand to: fb561f19fa25b24c516f46e05f2e6d2d
- Category: DevelopmentVariables, SystemInformationVariables, UsersAndAuthenticationVariables
- Related: TWikiUserAuthentication, AUTHREALM, SESSIONVAR, LOGIN, LOGOUT, SESSION_VARIABLE (this topic)
SESSION_VARIABLE -- get, set or clear a session variable
- Session variables are stored in a personal "persistent memory space" that is not lost until the web browser is closed
- Syntax:
%SESSION_VARIABLE{"name"}%
- read a session variable - Syntax:
%SESSION_VARIABLE{"name" set="value"}%
- set a session variable - Syntax:
%SESSION_VARIABLE{"name" clear=""}%
- clear a session variable - Special read-only session variables:
-
%SESSION_VARIABLE{"AUTHUSER"}%
- user ID, current value: -
%SESSION_VARIABLE{"SESSION_REQUEST_NUMBER"}%
- number of pages accessed by current user since login, current value:
-
- Note: It is not possible to set/get/clear session variables starting with an underscore, such as
"_NON_OF_YOUR_BUSINESS"
- Category: DevelopmentVariables, SystemInformationVariables, UsersAndAuthenticationVariables
- Related: TWikiUserAuthentication, AUTHREALM, GET, LOGIN, LOGOUT, SESSIONID, SESSIONVAR, SET (this topic)
USERINFO{"name"} -- retrieve details about a user
- Syntax:
%USERINFO%
- Expands to:
guest, TWikiGuest,
(comma-separated list of the username, wikiusername, and emails) - With formatted output, using tokens
$emails
,$username
,$wikiname
,$wikiusername
,$groups
and$admin
($admin returns 'true' or 'false'):- Example:
%USERINFO{ format="$username is really $wikiname" }%
- Expands to:
guest is really TWikiGuest
- Example:
- Retrieve information about another user:
- Example:
%USERINFO{ "TWikiGuest" format="$username is really $wikiname" }%
- Expands to:
guest is really TWikiGuest
- Note: The parameter should be the wikiname of a user. Since TWiki 4.2.1, you can also pass a login name. You can only get information about another user if the
{AntiSpam}{HideUserDetails}
configuration option is not enabled, or if you are an admin. (User details are hidden in this TWiki)
- Example:
- Category: SystemInformationVariables, UsersAndAuthenticationVariables
- Related: USERNAME, WIKINAME, WIKIUSERNAME, TWikiUserAuthentication, ChangeEmailAddress (this topic)
USERNAME -- your login username
- TWiki makes names available in three formats: USERNAME like
jsmith
, WIKINAME likeJohnSmith
and WIKIUSERNAME likeMain.JohnSmith
. Un-authenticated users are all TWikiGuest. - Syntax:
%USERNAME%
- Expands to:
guest
- Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates for details.
- Category: SystemInformationVariables, UsersAndAuthenticationVariables
- Related: REMOTE_USER, USERINFO, WIKINAME, WIKIUSERNAME, TWikiUserAuthentication (this topic)
USERREPORT -- show user reports with profile pictures
- Show various user reports documented in UserReports
- Syntax:
%USERREPORT{ action="..." ... }%
- Overview of actions with parameters:
Report action= Parameters Show users in business card format "business_card_start"
"business_card"
or
"business_card_list"
"business_card_end"
style
user
,style
users
,style
noneShow the profile picture image of a user "profile_picture"
user
,height
,width
,title
Show a selector to pick a user,
for use in HTML forms"select_one_user"
name
,selected
,users
Show rows of checkboxes to select users,
for use in HTML forms"select_users"
name
,selected
,users
,colums
,style
Show slim, one line height user boxes "slim_box_start"
"slim_box"
or
"slim_box_list"
"slim_box_end"
style
user
,style
users
,style
noneShow small, two line height user boxes "small_box_start"
"small_box"
or
"small_box_list"
"small_box_end"
style
user
,style
users
,style
noneShow a simple list of registered users "user_list"
search
,limit
,sort
,reverse
- Example:
%USERREPORT{ action="user_list" search="jane" limit="5" }%
- Category: AdministrationVariables, DevelopmentVariables, UsersAndAuthenticationVariables
- Related: BUBBLESIG, SEARCH, USERSIG, UserList, UserReports (this topic)
USERSIG -- show user signature with profile picture icon
- Syntax:
%USERSIG{WikiName}%
or%USERSIG{WikiName - YYYY-MM-DD}%
- The parameter can be either just the WikiName of a user, or by convention the WikiName followed by a dash and the date
- Example:
-- %USERSIG{TWikiGuest - 2025-10-09}%
- Expands to:
--TWiki Guest - 2025-10-09
- Category: EditingAndContentUpdateVariables, FormattingAndRenderingVariables, UsersAndAuthenticationVariables
- Related: BUBBLESIG, USERREPORT, UserList, UserReports (this topic)
WIKINAME -- your Wiki username
- The WikiName is the same as
%USERNAME%
if not defined in the TWikiUsers topic - Syntax:
%WIKINAME%
- Expands to:
TWikiGuest
- Note: When used in a template topic, this variable will be expanded when the template is used to create new topic. See TWikiTemplates for details.
- Category: SystemInformationVariables, UsersAndAuthenticationVariables
- Related: REMOTE_USER, USERINFO, USERNAME, WIKIUSERNAME, WIKIUSERSTOPIC (this topic)
WIKIUSERNAME -- your Wiki username with web prefix
- Your %WIKINAME% with Main web prefix, useful to point to your user profile page
- Syntax:
%WIKIUSERNAME%
- Expands to:
Main.TWikiGuest
, renders as TWikiGuest - Note: When used in a template topic, this variable will be expanded when the template is used to create a new topic. See TWikiTemplates for details
- Category: SystemInformationVariables, UsersAndAuthenticationVariables
- Related: REMOTE_USER, USERINFO, USERNAME, WIKINAME (this topic)
WIKIUSERSTOPIC -- name of topic listing all registers users
- Syntax:
%WIKIUSERSTOPIC%
- Expands to:
TWikiUsers
, with Main prefix renders as TWikiUsers - Category: SystemInformationVariables, UsersAndAuthenticationVariables
- Related: WIKIUSERNAME (this topic)
Categories:
Administration, Applications & Components, Attachments & Files, Charting & Drawing, Database & Forms, Date & Time, Development, Editing & Content Update, Email & Notification, Export & Publishing, Formatting & Rendering, Import, Linking & Navigation, Searching & Listing, Security & Access Control, Skins & Templates, System Information, Tables & Spreadsheets, UI& Visualization, Users & Authentication, Workflow & Automation