UserRoleInfoProviderAdd Method |
Namespace: CMS.MembershipAssembly: CMS.Membership (in CMS.Membership.dll) Version: 13.0.131
Syntax 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 Exception | Condition |
---|
ArgumentException | Thrown when userId or roleId does not identify an existing user or role respectively. |
See Also