Click or drag to resize
UserRoleInfoProviderAdd Method
Creates UserRoleInfo binding.

Namespace: CMS.Membership
Assembly: CMS.Membership (in CMS.Membership.dll) Version: 13.0.131
Syntax
C#
public virtual void Add(
	int userId,
	int roleId,
	Nullable<DateTime> validTo = null
)

Parameters

userId
Type: SystemInt32
User ID.
roleId
Type: SystemInt32
Role ID.
validTo (Optional)
Type: SystemNullableDateTime
Date till user role connection is valid, or null.

Implements

IUserRoleInfoProviderAdd(Int32, Int32, NullableDateTime)
Exceptions
ExceptionCondition
ArgumentExceptionThrown when userId or roleId does not identify an existing user or role respectively.
See Also