Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Group Member Viewer -> get user role (in group) View modes: 
User avatar
Member
Member
eagleag - 11/30/2010 12:49:16 PM
   
Group Member Viewer -> get user role (in group)
Hi,
I'm using two Group Member Viewer webparts on smae page.
I would like the first one to display all members of GROUP that belong to role myRole
and second webpart to display all member the belong to group role mySecondRole.

How can I get the group roles assigned to each member?

NOTE: these are group roles.

THANKS :)


User avatar
Member
Member
kentico_michal - 12/2/2010 5:56:05 AM
   
RE:Group Member Viewer -> get user role (in group)
Hi,

Regrettably, Group members viewer web part does not have any property that would allow you to filter users depending on roles that users are assigned to. On the other side, Group members viewer web part has property Where condition property, where you can insert standard SQL Where conditions. So you could create SQL WHERE condition and use this property to filter users.
Users are stored in CMS_User table. Primary key UserID is used in user-role relationship definition in CMS_UserRole table and information about Roles is stored in CMS_Role table.

Best regards,
Michal Legen

User avatar
Member
Member
eagleag - 12/5/2010 6:25:05 AM
   
RE:Group Member Viewer -> get user role (in group)
THANKS :)

I used this code:


UserID IN (select UserID FROM CMS_UserRole where RoleID = (select RoleID from CMS_Role where RoleDisplayName = 'MyRoleName'))