$User

A global merge field type to use when referencing information about the current user. User merge fields can reference information about the user such as alias, title, and ID.

Usage

Use dot notation to access the current user’s information. For example:
{!IF (CONTAINS($User.Alias, Smith) True, False)}

Example

The following example displays the current user’s company name, as well as the status of the current user (which returns a Boolean value).
<apex:page>
  <h1>Congratulations</h1>
   This is your new Apex Page
   <p>The current company name for this 
      user is: {!$User.CompanyName}</p>
   <p>Is the user active?  
      {!$User.isActive}</p>
</apex:page>
Previous
Next