Click or drag to resize
UserRoleInfoProviderAddUserToRole Method (Int32, Int32)

Note: This API is now obsolete.

Adds specified user to the site.

Namespace: CMS.Membership
Assembly: CMS.Membership (in CMS.Membership.dll) Version: 13.0.131
Syntax
C#
[ObsoleteAttribute("Use IUserRoleInfoProvider.Add(int, int, DateTime?) instead. To get an instance of the interface's implementation, use dependency injection or access the instance directly - UserRoleInfo.Provider.")]
public static void AddUserToRole(
	int userId,
	int roleId
)

Parameters

userId
Type: SystemInt32
UserID
roleId
Type: SystemInt32
RoleID
See Also