Hello,
Trying to get a list of all public roles and if the user is currently assigned that role.
Dim alUserRoleInfo As ArrayList = objRoleControler.GetUserRoles(Me.PortalId, Me.UserId)
Returns 2 RoleInfo objects in the array list as I would expect since the user is a member of subscriber and one additional role.
objRoleInfo (as I step through the object see below) returns empty strings/zeros.
objRoleInfo.RoleName & " (" & objRoleInfo.Description & ")" & objRoleInfo.RoleID
adds" () 0" twice to the listbox
Any ideas on what I am doing wrong?
Thanks,
theMouse
***************************************
THE CODE:
***************************************
Dim objRoleControler As New RoleController
'All roles
Dim alRoleInfo As ArrayList = objRoleControler.GetPortalRoles(Me.PortalId)
'User Roles
Dim alUserRoleInfo As ArrayList = objRoleControler.GetUserRoles(Me.PortalId, Me.UserId)
Dim objRoleInfo As RoleInfo
Me.chklRoles.Items.Clear()
For Each objRoleInfo In alUserRoleInfo
Me.chklRoles.Items.Add(objRoleInfo.RoleName & " (" & objRoleInfo.Description & ")" & objRoleInfo.RoleID)
Next