The Portal Connector Identity Object

In JavaScript the tpc.identity object returns a bunch of useful information about the logged in user as shown below:

For example, to view all the contact details for logged in user, simply type “tpc.identity” into the console:


tpc-identity-object

The following tables lists the properties of the tpc.identity client-side object.



Property Name

Description

contactId

Returns the Contact ID of the logged in user

crmUserId

Returns the User ID stored in the Portal User record of the logged in user

firstName

The first name of the contact in CRM.

lastName

The last name of the contact in CRM.

fullName

The full name of the contact

parentCustomerId

Returns the logged in users Parent Customer ID (if present)

parentCustomerType

Returns the logged in users Parent Customer logical name (if present)

priceListId

Returns the Price List ID associated to the Portal User record for the logged in user

roles

Refers to the Portal Roles assigned to the contact.

userEmail

Returns the Sitefinity user email address

userId

Returns the Sitefinity user ID

userName

Returns the Sitefinity user name