Copied to clipboard

Flag this post as spam?

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


  • Patrick 33 posts 82 karma points
    Aug 14, 2014 @ 15:50
    Patrick
    0

    Filtering Members by membergroup

    I am working on a Umbraco 7 site and want to show members on the front end of the site.

    The list of members shown is according to the chosen membergroup.

    Example:
    user a is a member of membergroup 1 and 2
    user b is a member of membergroup 1

    When I filter on membergroup 1 I only want to see user a

    I found the code to list all groups: memberService.GetAllRoles();
    And also the code to list all member: memberService.GetAllMembers();

    The issue is to filter like .GetAllMembers().Where(group=1) or something like that.
    Is this possible?

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Aug 14, 2014 @ 15:54
    Jeavon Leopold
    100

    How about using the GetMembersByGroup method?

    e.g.

    memberService.GetMembersByGroup("groupname")
    
  • Patrick 33 posts 82 karma points
    Aug 14, 2014 @ 15:56
    Patrick
    0

    That's what I was looking for.

    Thank's for the fast reply!

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Aug 14, 2014 @ 15:57
    Jeavon Leopold
    0

    Great!

Please Sign in or register to post replies

Write your reply to:

Draft