Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jared 2 posts 22 karma points
    May 18, 2012 @ 19:53
    Jared
    0

    Programatically Getting members and roles

    I'm using Umbraco V5.1 built from the Visual Studio template. I'm currently running it on IIS Express with Sql 2008 Express on Windows 7.

    I want to get all members and roles from the system to be displayed in the front end. I've tried using the following:

    System.Web.Security.Roles.GetAllRoles();
    System.Web.Security.Roles.GetUsersInRoles(roles[0]);

    And a few others, but they all throw a not implemented error.

    Is there a setting/config that must be set or added that I'm missing or is there something else that I might be missing.

    Any help would be greatly appreciated.

  • Jared 2 posts 22 karma points
    May 22, 2012 @ 00:45
    Jared
    0

    A user on StackOverflow was able to answer this for me.

    You have to use the IRoutableRequestContext that can be passed into the controller constructor and then use 

    _context.Application.Security.Members.GetAll()

Please Sign in or register to post replies

Write your reply to:

Draft