Adds a User to a Role

Namespace: DotNetNuke.Security.Roles
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
public static void AddUserRole(
	UserInfo user,
	RoleInfo role,
	PortalSettings portalSettings,
	RoleStatus status,
	DateTime effectiveDate,
	DateTime expiryDate,
	bool notifyUser,
	bool isOwner
)
Visual Basic
Public Shared Sub AddUserRole ( 
	user As UserInfo,
	role As RoleInfo,
	portalSettings As PortalSettings,
	status As RoleStatus,
	effectiveDate As DateTime,
	expiryDate As DateTime,
	notifyUser As Boolean,
	isOwner As Boolean
)

Parameters

user
Type: DotNetNuke.Entities.Users..::..UserInfo
The user to assign
role
Type: DotNetNuke.Security.Roles..::..RoleInfo
The role to add
portalSettings
Type: DotNetNuke.Entities.Portals..::..PortalSettings
The PortalSettings of the Portal
status
Type: DotNetNuke.Security.Roles..::..RoleStatus
RoleStatus
effectiveDate
Type: System..::..DateTime
The expiry Date of the Role membership
expiryDate
Type: System..::..DateTime
The expiry Date of the Role membership
notifyUser
Type: System..::..Boolean
A flag that indicates whether the user should be notified
isOwner
Type: System..::..Boolean
A flag that indicates whether this user should be one of the group owners

See Also