Click or drag to resize
MembershipUserInfoProviderAddMembershipToUser Method (Int32, Int32, DateTime, Boolean)
Sets relationship between specified membership and user.

Namespace: CMS.Membership
Assembly: CMS.Membership (in CMS.Membership.dll) Version: 8.2.23
Syntax
C#
public static void AddMembershipToUser(
	int membershipId,
	int userId,
	DateTime validTo,
	bool sendNotification
)

Parameters

membershipId
Type: SystemInt32
Membership ID
userId
Type: SystemInt32
User ID
validTo
Type: SystemDateTime
Date to membership for user is valid
sendNotification
Type: SystemBoolean
Indicates, if notification will be send to user when membership is expiring
See Also