Sorry for the confusion. Let me explain the rest of the story (doesn't there always seem to be a "rest of the story"?) I have a DNN module (IndooGrid) that I use for tons of things. I noticed that one of their new features (the ability to behave differently depending on whether the user is a member of a particular role) doesn't seem to always work properly when I am on my main portal (which turns-out to be #26.) I did as much debugging as I could without having their source code - which included turning-on a capture of all SQL commands submitted to the server. I noticed that their code was checking what roles I was a member-of on PortalID 0 - recall I was logged into 26.
I reported this as a bug via their forum. The developer's response was that they didn't think it was a bug because they were simply using the built-in DNN mechanism to determine roles. They attached a snippit of their code that does this checking. I constructed my own stand-along module to verify their code and determined that, indeed, it is checking PortalID 0. That leads me to this forum post ... I am essentially trying to determine if there is something wrong with my configuration (so I can get this feature of Indoo working on my system) or if there is a bug in their code so I can demonstrate it to them and they can fix it and ship me a patched version of their module.
(Hopefully this all makes more sense now.) This may sound like I am going a little "above and beyond" as a client of theirs but I use this module for a bunch of things and, other than this one issue, it is a great tool. I need this new feature of theirs to work quickly so I can release some functionality that uses it. The code they sent me that they are using to check to see what roles the user is in is:
Dim mRoles As New DotNetNuke.Entities.Users.OnlineUserInfo
Dim mUserRoles As New DotNetNuke.Security.Roles.RoleController
Dim mUser As DotNetNuke.Entities.Users.UserInfo = DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo
Return mUserRoles.GetRolesByUser(mUser.UserID, mRoles.PortalID)
Let me know if their code is wrong and I will "break the news" to them. Sorry if my previous posts were too cryptic - I was hoping that it would be a quick and easy answer for y'all.