UserInfo allows you retrieve data about the user by provideing the user id, uid, which is an integer.
It returns all the fields for the user id (uid) that is passed to the page.
If no uid is passed, then the data provided is that for the logged in user.
<fm:UserInfo uid={$$get.uid}>
<a href="/profile/{$$user.id}">{$$user.user}</a><br />
</fm:UserInfo>
Name | Required | Default | Description |
---|---|---|---|
uid | Optional | N/A |
Name | Description |
---|---|
user.user | The username |
user.email | User's email address |
user.firstname | User's given name |
user.lastname | User's family name |
user.address1 | Address line 1 |
user.address2 | Address line 2 |
user.cellphone | User's cellphone number |
user.phone | User's homephone number |
user.city | User's city |
user.country | User's 2-letter country code |
user.created | Created date and time |
user.friends | Number of friends |
user.geo_latitude | The user's latitude |
user.geo_longitude | The user's longitude |
user.id | The user's unique id |
user.meta | The user's meta-data as a serialized string |
user_metadata | The user's meta-data as an array. Its values are configurable in the user profile page. Because the user's metadata is configurable, its variables differ for each user. Sample user_metadata variables for the templates are:
|
user.metadata | Same as 'user.metadata': the user's meta-data as an array. Its values are configurable in the user profile page. Because the user's metadata is configurable, its variables differ for each user. Sample user_metadata variables for the templates are:
|
user.json_meta | The user's meta-data as a json encoded object. |
user.description | The user's description |
user.gender | The user's gender |
user.website | The user's website |
user.occupation | The user's occupation |
user.nickname | The user's displayname/nickname |
user.accounttype | The user's account type. Numeric field (integer) Its value can range from 0 to 262144 (2^18). Its value is held in the variable {$$loggedinuser.accounttype}. Most likely values are 10, which stands for voter, and 11 which denotes entrant. The value can be set by template developers, who can set the value of the intergs to have any meaning that is necessary. Examples of filetypes: 1 = Administrator 2 = User 10 = Voter 11 = Entrant |
user.postalcode | The user's postalcode |
user.approvedfiles | The number of approved media items this user has |
user.deniedfiles | The number of denied media items this user has |
user.unmoderatedfiles | The number of unmoderated media items this user has |
user.publicfiles | The number of uploads this user did |
user.state | 2-letter state code |
user.disabled | |
user.disable_media_notifications | The user's setting for Media notifications - an integer: (0 for allow notifications, 1 for disable notifications) |
user.disable_thread_notifications | The user's setting for Thread notifications - an integer: (0 for allow notifications, 1 for disable notifications) |
user.externalids | Array of external ids from various providers the user may have. Eg. user.externalids.0.external_id_provider, user.externalids.0.external_id, user.externalids.0.external_id_sub_provider |
This UserInfo component displays information such as firstname, lastname, accounttype and vhost for the user.
<fm:UserInfo uid={$$get.uid}>
The following is information about the user with id {$$get.uid} :
<BR> firstname: {$$user.firstname}
<BR> lastname: {$$user.lastname}
<BR> user: {$$user.user}
<BR> accounttype: {$$user.accounttype}
<BR> active: {$$user.active}
<BR> address1 {$$user.address1}
<BR> country {$$user.country}
<BR> vhost {$$user.vhost}
<BR> created {$$user.created}
</fm:UserInfo>
This UserInfo component displays information such as user_metadata language, fbconnect and rules in addition to firstname and lastname for the user.
<fm:UserInfo uid={$$get.uid}>
The following is information about the user with id {$$get.uid} :
<BR> firstname: {$$user.firstname}
<BR> lastname: {$$user.lastname}
<br /> user_metadata.lang: {$$user_metadata.lang}
<br /> user_metadata.fbconnect: {$$user_metadata.fbconnect}
<br /> user_metadata.rules: {$$user_metadata.rules}
</fm:UserInfo>