Click or drag to resize
ContactManagementContextGetCurrentContact Method
Returns current contact. Tries to find contact in persistent storage, obtains it from the users or tries to recognize it according to known information. If no contact can be found and createAnonymous is true (default), it creates a new anonymous contact. If Online marketing is not enabled or there is no license for ContactManagement found, null is returned. Also, null is returned if request is made by crawler (googlebot, etc.). Currently authenticated user is used to find contacts.

Namespace: CMS.ContactManagement
Assembly: CMS.ContactManagement (in CMS.ContactManagement.dll) Version: 13.0.131
Syntax
C#
public static ContactInfo GetCurrentContact(
	bool createAnonymous = true
)

Parameters

createAnonymous (Optional)
Type: SystemBoolean
Indicates whether anonymous contact should be created if no contact information can be found.

Return Value

Type: ContactInfo
Current contact
See Also