Click or drag to resize
ContactManagementContextGetCurrentContact Method (CurrentUserInfo, Boolean)

Note: This API is now obsolete.

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, 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.).

Namespace: CMS.ContactManagement
Assembly: CMS.ContactManagement (in CMS.ContactManagement.dll) Version: 12.0.0
Syntax
C#
[ObsoleteAttribute("Use method ContactManagementContext.UpdateUserLoginContact(string) instead.")]
public static ContactInfo GetCurrentContact(
	CurrentUserInfo currentUser,
	bool forceUserMatching
)

Parameters

currentUser
Type: CMS.MembershipCurrentUserInfo
Contact assigned to this user will be returned, if contact is not already known
forceUserMatching
Type: SystemBoolean
If true, contact contact will be taken from user in currentUser parameter even if it is already known from cookie for example.

Return Value

Type: ContactInfo
Current contact
See Also