Determines if the specified user can be removed from a role

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

Syntax

C#
public static bool CanRemoveUserFromRole(
	PortalInfo PortalInfo,
	int UserId,
	int RoleId
)
Visual Basic
Public Shared Function CanRemoveUserFromRole ( 
	PortalInfo As PortalInfo,
	UserId As Integer,
	RoleId As Integer
) As Boolean

Parameters

PortalInfo
Type: DotNetNuke.Entities.Portals..::..PortalInfo
A PortalInfo structure representing the current portal
UserId
Type: System..::..Int32
The Id of the User
RoleId
Type: System..::..Int32
The Id of the Role that should be checked for removability

Return Value

returnsM:DotNetNuke.Security.Roles.RoleController.CanRemoveUserFromRole(DotNetNuke.Entities.Portals.PortalInfo,System.Int32,System.Int32)

Remarks

Roles such as "Registered Users" and "Administrators" can only be removed in certain circumstances

See Also