MembershipUserInfoProviderAddMembershipToUser Method |
Note: This API is now obsolete.
Sets relationship between specified membership and user.
Namespace: CMS.MembershipAssembly: CMS.Membership (in CMS.Membership.dll) Version: 13.0.131
Syntax [ObsoleteAttribute("Use IMembershipUserInfoProvider.Add(int, int) instead. To get an instance of the interface's implementation, use dependency injection or access the instance directly - MembershipUserInfo.Provider.")]
public static void AddMembershipToUser(
int membershipId,
int userId,
DateTime validTo,
bool sendNotification = false
)
Parameters
- membershipId
- Type: SystemInt32
Membership ID - userId
- Type: SystemInt32
User ID - validTo
- Type: SystemDateTime
Date to which membership is valid for user - sendNotification (Optional)
- Type: SystemBoolean
Indicates, if notification will be sent to user when membership expires
Remarks
Invalidates the
UserInfo object of the user whose membership is being modified.
See Also