This method is used to retrieve extended information regarding the current user. 

Description

This method is used to retrieve extended information regarding the current user. The response of this method includes a User object enfolding user data. See the User object page for the full specification of the available information.

REST API > socialize.getUserInfo.

Securing the getUserInfo Process

The Gigya service supports a mechanism to verify the authenticity of the getUserInfo process.
If the
global configuration object's signIDs field is set to 'true', Gigya "signs" the UID field received in the response with a cryptographic signature to prevent fraud.
The User object that you receive in the response has a cryptographic signature (UIDSignature data member) provided by Gigya.
We highly recommend verifying the authenticity of the signature to prove that it has indeed originated from Gigya rather than somewhere else.
Please follow the instruction in the Signature Validation Process section in the Security page of the Developer's Guide.

Note: The signature mechanism prevents any tampering with the user ID (UID) but it is not meant to protect other user data fields. For retrieving sensitive data (such as email addresses) we recommend using the REST API > socialize.getUserInfo call to Gigya directly from your server to retrieve that data.

 

 

Required NameTypeDescription
callbackfunction
cidstring
includeAllIdentitiesBooleanThis parameter's default value is 'false'. If set to 'true' you will receive all the user's identities, including those with expired sessions. The identities are received in the response: response.user.identities is an array of Identity objects. Each object has an attribute response.user.identities[i].isExpiredSession that is 'true'when the session expired for that provider (or is otherwise inactive) and 'false'if it is active.
contextobject
extraFieldsstring
enabledProvidersstringA comma delimited list of providers from which to return user information in the response.
disabledProvidersstringA comma delimited list of providers from which not to return user information in the response.
signIDsBooleanThe default value is 'false'. When this field is set to 'true', the User object returned by the method is signed by Gigya. To learn more about this subject, please refer to the Security page of the Developer's Guide.
includeiRankBoolean Deprecated . This parameter's default value is 'false'. If set to 'true' you will receive the user's iRank (influencer rank) in the response User object.

FieldTypeDescription
userUser objectUser object with updated information for the current user. 

 

Code Sample

function printResponse(response) {  
    if ( response.errorCode == 0 ) {             
        var user = response['user'];
        var msg = 'User '+user['nickname'] + ' is ' +user['age'] + ' years old';
        alert(msg);
    }
    else {
        alert('Error :' + response.errorMessage);
    }  
}

gigya.socialize.getUserInfo({callback:printResponse});

 

In the Get User Information Demo page you will find a complete working example that uses socialize.getUserInfo method. You may view the code, run it and view the outcome.

 

 

<script>
$(document).ready(function() {
    lssdk.tableFixer();
	lssdk.fixTableBottoms('tVar2');
});
</script>