Copied to clipboard

Flag this post as spam?

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


  • Tim 1193 posts 2655 karma points c-trib
    Jul 06, 2015 @ 15:59
    Tim
    0

    Getting All members as IPublishedContent

    Does anyone know if it's possible to get all of the members for a site as IPublishedContent? There are methods to find single users as IPublishedContent in the Members Helper, but nothing I can find that would allow me to list ALL of the members using IPublishedContent.

    I can either just code directly adjacent the Members Service or roll my own code if need be, but I don't want to re-invent the wheel if this is already possible.

  • Dennis Aaen 4457 posts 17970 karma points admin hq c-trib
    Jul 06, 2015 @ 17:44
    Dennis Aaen
    0

    Hi Tim,

    I think you need to use the MemberService to archive what you are trying to do.

    @foreach (var member in ApplicationContext.Current.Services.MemberService.GetAllMembers())
     {
                @member.Name
     }
    

    The documentation can be found here https://our.umbraco.org/DOCUMENTATION/Reference/Management-v6/Services/MemberService, but you properly already know that

    Hope this helps,

    /Dennis

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies