fm:UserInfo


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.

Example 1

<fm:UserInfo uid={$$get.uid}> <a href="/profile/{$$user.id}">{$$user.user}</a><br /> </fm:UserInfo>

Supported attributes

NameRequiredDefaultDescription
uidOptionalN/A

Template variables

NameDescription
user.userThe username
user.emailUser's email address
user.firstnameUser's given name
user.lastnameUser's family name
user.address1Address line 1
user.address2Address line 2
user.cellphoneUser's cellphone number
user.phoneUser's homephone number
user.cityUser's city
user.countryUser's 2-letter country code
user.createdCreated date and time
user.friendsNumber of friends
user.geo_latitudeThe user's latitude
user.geo_longitudeThe user's longitude
user.idThe user's unique id
user.metaThe user's meta-data as a serialized string
user_metadataThe 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.lang} - the user's metadata language
  • {$$user_metadata.twitterUserName} - the user's metadata twitter username
  • {$$user_metadata.rules} - the user's rules
user.metadataSame 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_metadata.lang} - the user's metadata language
  • {$$user_metadata.twitterUserName} - the user's metadata twitter username
  • {$$user_metadata.rules} - the user's rules
user.json_metaThe user's meta-data as a json encoded object.
user.descriptionThe user's description
user.genderThe user's gender
user.websiteThe user's website
user.occupationThe user's occupation
user.nicknameThe user's displayname/nickname
user.accounttypeThe 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.postalcodeThe user's postalcode
user.approvedfilesThe number of approved media items this user has
user.deniedfilesThe number of denied media items this user has
user.unmoderatedfilesThe number of unmoderated media items this user has
user.publicfilesThe number of uploads this user did
user.state2-letter state code
user.disabled
user.disable_media_notificationsThe user's setting for Media notifications - an integer: (0 for allow notifications, 1 for disable notifications)
user.disable_thread_notificationsThe user's setting for Thread notifications - an integer: (0 for allow notifications, 1 for disable notifications)
user.externalidsArray 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

See also

More examples

Example 2

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>

Example 3

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>