ICurrentContactProviderGetCurrentContact Method |
Recognizes a contact currently browsing the live site. If the contact cannot be recognized a new one is created. A returned contact is always
valid (exists in database, is not merged, etc.) and is automatically assigned to currentUser User (if it's not a public
user).
Namespace: CMS.ContactManagementAssembly: CMS.ContactManagement (in CMS.ContactManagement.dll) Version: 12.0.0
Syntax ContactInfo GetCurrentContact(
IUserInfo currentUser,
bool forceUserMatching
)
Parameters
- currentUser
- Type: CMS.BaseIUserInfo
Currently signed in user or public user - forceUserMatching
- Type: SystemBoolean
If true, the current contact is tried to be determined by the user even if it can be found by other ways
Return Value
Type:
ContactInfoThe recognized contact or a new contact, if it was not possible to recognize the contact.
Exceptions See Also