- Home
- Guides
- Common Objects
- Viewer Profile
Viewer Profile
Overview
The VIEWER_PROFILE object is accessible from within Smarty templates and represents the User object for the currently logged in user. In the event that the current user is anonymous all calls made against this object will return no response. This object is the same as the OWNER_PROFILE object (which represents the User who owns the currently requested page).
Example Uses
Variable | Description |
---|---|
{$VIEWER_PROFILE->name} | The display name of the user |
{$VIEWER_PROFILE->avatar()} | URL of the user’s 40×40 avatar image URL |
{$VIEWER_PROFILE->avatar(60)} | URL of an alternate size of the user avatar. Network options must be set to tell the network to save copies of the user’s avatar in alternate sizes. |
{$VIEWER_PROFILE->photo()} | URL of the user’s large profile photo |
{$VIEWER_PROFILE->photo(120)} | URL of an alternate size of the profile photo. Network options must be set to tell the network to save copies of the profile photo in alternate sizes. |
{$VIEWER_PROFILE->quote} | The user’s quote |
{$VIEWER_PROFILE->get_field(‘PROFILE_FIELD’)} | A field from the user’s extensible profile. substitute PROFILE_FIELD for the name of the profile field. i.e. FAVORITE_MOVIES |
{$VIEWER_PROFILE->status} | The user’s status message |
{$VIEWER_PROFILE->mood_icon} | URL for the icon of the user’s current mood |
{$VIEWER_PROFILE->mood} | The user’s mood selection |
{$VIEWER_PROFILE->home_url} | URL for the viewer’s homepage |
{$VIEWER_PROFILE->location} | Location specified for user in the profile. |
{$VIEWER_PROFILE->age} | Age.
Note: calling this directly overrides the system’s ability to know if the user has set their age to private. |
{$VIEWER_PROFILE->dob} | Date of birth of user.
Note: calling this directly overrides the system’s ability to know if the user has set their age to private. |
{$VIEWER_PROFILE->dob_month} | Date of birth month.
Note: calling this directly overrides the system’s ability to know if the user has set their age to private. |
{$VIEWER_PROFILE->dob_day} | Date of birth day.
Note: calling this directly overrides the system’s ability to know if the user has set their age to private. |
{$VIEWER_PROFILE->dob_year} | Date of birth year.
Note: calling this directly overrides the system’s ability to know if the user has set their age to private. |
{$VIEWER_PROFILE->first_name} | First name |
{$VIEWER_PROFILE->last_name} | Last name |
{$VIEWER_PROFILE->date_status_updated} | Date status was last updated |