Table of contents
- 1. Description
- 1.1.1. Data Availability
- 2. Data Members
Description
This object represents the current user in the system. The User object may be retrieved with updated information using the getUserInfo method.
Note: if the UID field of the User object is empty, then the entire object is not valid and the rest of the data fields are meaningless. This situation may happen when calling the getUserInfo method while the current user is not connected to any social network.
Data Availability
Different providers provide different data. Thus, the availability of the data members of the User object depends on the specific provider to which the user is connected. The following table presents the availability of profile data by the main providers. Please note that the availability is also dependent on user permissions.
Data Members
| Field Name | Type | Description |
| UID | string | A unique ID for the person represented by this object. The UID is guaranteed to be consistent over time for users who were authenticated on the site by using either login or notifyLogin. Note that if notifyLogin was used then UID will return the same ID provided by the site. Notes:
|
| isSiteUID | Boolean | This field indicates if the UID is a site UID (provided by your site) or an ID generated by Gigya. Your site may provide the site UID using the socialize.setUID, socialize.notifyRegistration or socialize.notifyLogin methods. |
| UIDSignature | string | If the global configuration object's "signIDs" field is set to 'true', Gigya "signs" the User object (when returned by an API method) with a cryptographic signature, to prevent fraud. This field will hold the signature, that should be used for verification*. |
| signatureTimestamp | number | If the global configuration object's "signIDs" field is set to 'true', Gigya "signs" the User object (when returned by an API method) with a cryptographic signature, to prevent fraud. This field will hold the timestamp that should be used for verification*. The timestamp is the GMT time of the response in UNIX time format (i.e. the number of seconds since Jan. 1st 1970). |
| loginProvider | string | The name of the provider that the user used in order to login. If the user logged in using your site login mechanism, then the value of this parameter would be 'site'. If the user is not logged in, then the value of this parameter would be an empty string. If the value of this parameter is not an empty string then user.identities[user.loginProvider] is the identity used for login. |
| loginProviderUID | string | If the user is logged-in then this field will hold the user's ID from the login provider. For example, if the user logged-in using Facebook then this field will hold the user's Facebook ID. |
| isSiteUser | Boolean | Indicates whether the current user is a user of the site. This is useful for checking which friends of the current user are also users of the same site. |
| isTempUser | Boolean | Indicates whether the current user is a temporary user. A temporary user in the Gigya platform is a user with a temporary identity, a guest user, a user that is not registered in Gigya's platform. Technically, a temporary user is characterized by a temporary UID. A Gigya temporary UID is a string with a "_tmp_" prefix. A temp user is created, by default, when Adding Connection without Logging-in. |
| isConnected | Boolean | Indicates whether the user is connected to any available provider. This is true only if the user isSiteUser=true and it has at least one identity. |
| providers | array of strings | Contains the names of the providers to which the user is connected/logged in. |
| identities | dictionary object | A dictionary object where the keys are the names of the providers to which the user is connected (i.e. 'facebook', 'yahoo', etc.) and the values are Identity objects received from that provider. For example: If the user is connected to myspace then user.identities['myspace'] is the identity object representing his myspace identity and user.identities['myspace'].providerUID is the ID of the user in MySpace. Note: For User objects returned by getFriendsInfo only identities that are actually friends of the current user will be included here. (i.e. suppose User A has a Facebook identity which is a friend of the Facebook Identity of User B, and User B also has a Myspace identity. When asking for the friends of User A you will get User B but only with his Facebook identity.) |
| nickname | string | The person's nickname, this may be either the nickname provided by the connected provider or a concatenation of the first and last names. |
| photoURL | string | The URL of person's full size photo. |
| thumbnailURL | string | The URL of person's thumbnail photo when available. |
| firstName | string | The person's first name. |
| lastName | string | The person's last name. |
| gender | string | The person's gender. The value may be either 'm' or 'f'. |
| age | number | The person's age. |
| birthDay | number | The day in the month in which the person was born. |
| birthMonth | number | The month in which the person was born. |
| birthYear | number | The year in which the person was born. |
| string | The person's email. | |
| country | string | The person's country. |
| state | string | The person's state. |
| city | string | The person's city. |
| zip | string | The person's zip code. |
| profileURL | string | The URL of the person's profile on his primary Provider. |
| likes | JSON object | The person's Facebook likes. The likes array may include the following fields:
|
| iRank | number | Influencer rank. The iRank is a number between 1-99, which denotes the percentile location of the user in comparison to all other site users as a site influencer. For example, if a user's iRank equals 60, this means that 60% of the site users influence less than this user, or in other words, this user is in the top 40% of site influencers. The iRank is calculated based on the amount of exposure this user provides the site. The calculation is done for the past several months, where recent activities receive higher ranks. The iRank is per site (per API key), the same user may have different ranks for different domains.The iRank calculation uses the following parameters:
Notes:
|
| oldestDataUpdatedTimestamp | integer | The time when the oldest data of the object was refreshed in Java time format, i.e. milliseconds since Jan. 1st 1970. |
| oldestDataAge | integer | The difference in seconds between the oldestDataUpdatedTimestamp and the current time. |
| proxiedEmail | string | A proxied email address is a storable channel through which your application can contact your users. Proxied email is currently supported by Facebook only. For more information, please refer to Facebook's documentation. You will receive the user's proxied email only if both of the following two conditions are fulfilled:
|
| capabilities | object | The capabilities of the user. The capabilities of the user is the unification of the capabilities of all the providers to which the user is currently connected. The significance of the capabilities is indicating which operations are now available for the current user. The capabilities object has five Boolean fields representing five possible capabilities: login, notifications, actions, friends and status. Usage example: if (user.capabilities.friends) gigya.socialize.showFriendSelectorUI( { APIKey:'Put your API Key here'},{}); |
| languages | string | A comma-separated list of languages that the person speaks. |
| address | string | The person's address. |
| phones | array of objects | The person's phone numbers. |
| education | array of objects | The person's education details. |
| honors | string | A comma-separated list of the person's honors. |
| publications | array of objects | The person's publications' details. |
| patents | array of objects | The person's patents' details. |
| certifications | array of objects | The person's certifications' details. |
| professionalHeadline | string | The person's professional headline, often the job title at the company. |
| bio | string | A description of the person's professional profile. |
| industry | string | The industry in which the person's company operates . |
| specialties | string | The person's specialties. |
| work | array of objects | A collection of the person's work experience. |
| skills | array of objects | A collection of the person's skills. |
| religion | string | The person's religion. |
| politicalView | string | The person's political views. |
| interestedIn | string | The gender in which the person is interested. |
| relationshipStatus | string | The relationship status of the person. |
| hometown | string | The person's hometown. |
| favorites | JSON object | The person's favorite things, including favorite books, movies, etc. |
| username | string | The person's Facebook user name. |
| locale | string | The person's locale. |
| verified | Boolean | Indicates whether the person verified his email with Facebook. |
| timezone | string | The person's timezone. |
| UIDSig | string | Deprecated. Please use the UIDSignature parameter instead. |
| timestamp | string | Deprecated. Please use the signatureTimestamp parameter instead. This parameter holds the GMT time of the response in "yyyy-mm-dd HH:mm:ss" format where HH is in 24 hour time format. |
| isLoggedIn | Boolean | Deprecated. This field doesn't indicate whether the current user is logged. |
* To verify the authenticity of the User Object, follow the instructions in the section Signature Validation Process, using the UID, UIDSignature and signatureTimestamp fields.

Comments