| ICurrentContactProviderGetExistingContact Method | 
            Gets a contact assigned to the visitor currently browsing the live site (contact can only be recognized during web request).
            A returned contact is always valid (exists in database, is not merged, etc.) and is automatically assigned to currentUser (if it's not a public user).
            If no contact is currently assigned to the visitor null is returned.
            
 
Namespace: CMS.ContactManagementAssembly: CMS.ContactManagement (in CMS.ContactManagement.dll) Version: 13.0.131
 Syntax
SyntaxContactInfo GetExistingContact(
	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 
null when there is no contact assigned to current live site visitor
 Exceptions
Exceptions| Exception | Condition | 
|---|
| ArgumentNullException | currentUser is null | 
| InvalidOperationException | Processing of contacts cannot continue. This can be due to the insufficient license, disabled online marketing or incorrect request state. | 
 See Also
See Also