Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Adding Site to Site Group appears to break the GetUsersByRoleName() methodAdding Site to Site Group appears to break the GetUsersByRoleName() method
Previous
 
Next
New Post
3/5/2013 3:54 PM
 

We ran across an issue with a client attempting to use one of our modules in a Site that belongs to a Site Group.  After testing, we discovered that our module can no longer obtain a list of valid users that belong to a particular Security Role via the DNN API call GetUsersByRoleName().  It works perfectly when on a Site not belonging to a Site Group.  Has anyone ran into this issue?  If so, what did you find as a resolution.  It appears to be a bug in the API.  Any insight would be greatly appreciated.

Thanks,

David



nvisionative, Inc.
Corporate Website  |  Facebook Page  |  Twitter Page
 
New Post
3/7/2013 5:11 PM
 
By the way, it works fine in the Master Site, just not on the Member Site. We really would like to find a viable workaround for our client and a long term solution for this potential bug in DNN Professional. Any thoughts? Thanks.


nvisionative, Inc.
Corporate Website  |  Facebook Page  |  Twitter Page
 
New Post
3/20/2013 1:14 PM
 

I am having a hard time believing nobody has ran into this issue by now.  ;-)  If you have ANY insight, I would really love to hear from you.

Thanks,

David



nvisionative, Inc.
Corporate Website  |  Facebook Page  |  Twitter Page
 
New Post
3/28/2013 6:24 PM
 


nvisionative, Inc.
Corporate Website  |  Facebook Page  |  Twitter Page
 
New Post
3/29/2013 11:56 AM
Accepted Answer 
I was able to reproduce this, and will log this as a bug.

Luckily there is a workaround available, by using a different API call. As you may have noticed the Security Roles feature correctly reports members of roles that are unique to a member site. This is because the Security Roles features uses a different API call for that.

To explain, this is how I tested the behavior on the grouped portal:

            var roleController = new RoleController();

            Repeater1.DataSource = roleController.GetUsersByRoleName(PortalId, "Testrole1");
            Repeater1.DataBind();
            Repeater2.DataSource = roleController.GetUserRoles(PortalId, null, "Testrole1");
            Repeater2.DataBind();

The call to GetUsersByRoleName will fail, but the call to GetUserRoles, passing a null value for UserName gives a correct result. Please be aware that the objects that are returned are not UserInfo objects, but rather UserRoleInfo objects, so this is not a one to one workaround, some extra coding needs to be done.

Erik van Ballegoij, Former DNN Corp. Employee and DNN Expert

DNN Blog | Twitter: @erikvb | LinkedIn: Erik van Ballegoij on LinkedIn

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Using Modules a...Using Modules a...Adding Site to Site Group appears to break the GetUsersByRoleName() methodAdding Site to Site Group appears to break the GetUsersByRoleName() method


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out