atabrizi
atabrizi

Reputation: 918

Get roles of a user in certain portal dotnetnuke

i have a dotnetnuke with two portals that share users into 2 portals.

i want get roles of user A in portal 1 in a module in portal 2(in another portal)

how can i do that?

Upvotes: 1

Views: 1492

Answers (1)

Fix It Scotty
Fix It Scotty

Reputation: 2852

int portalId = 1;    
UserInfo user = UserController.GetUserById(portalid, UserID);

You can get the list of roles for a user in a specific portal using array: user.Roles or you can check if the user is in a specific role using: user.IsInRole(roleName).

Upvotes: 2

Related Questions