Object: user
The user object is accessible via the session object. The object is only available when there is a signed in user for the current session. The user object is not available for email templates.
Variables
.id
Unique ID for the user.
Examples
CODE{{ session.user.id }}
OUTPUT92345
.name
The display name for the user.
Examples
CODE{{ session.user.name }}
OUTPUTJohn Smith
.account
Account associated with the currently signed in user. There can only be one active account at any one time, even if the user is associated with multiple accounts.
Variable Dump
Copy and paste the below HTML into any template page, to see all user data dumped to your page. You can then simply remove the unnecessary fields and other elements, and format the remaining fields however necessary to achieve the desired look and feel.
<style> .thedump .name{ background-color:#3A5FCD; color:white; padding:0.5em; font-weight:bold; } .thedump .code{ background-color:#888888; color:white; padding:0.5em; } .thedump .out{ background-color:white; color:#555555; padding:0.5em; border-bottom:1px solid #CCCCCC; margin-bottom:1em; } .thedump .code pre{ padding:0; margin:0; font-size:1.1em; } </style> <div class="thedump"> <div class="name">User ID</div> <div class="code"><pre>{{ session.user.id }}</pre></div> <div class="out">{{ session.user.id }}</div> <div class="name">User Display Name</div> <div class="code"><pre>{{ session.user.name }}</pre></div> <div class="out">{{ session.user.name }}</div> </div>