Copied to clipboard

Flag this post as spam?

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


  • athenasumit 18 posts 69 karma points
    Jul 27, 2021 @ 12:59
    athenasumit
    0

    How to fetch members by username in bulk?

    As described in this documentation, we can fetch details of members by their username. But I want to fetch member details in bulk for a list of usernames. How can I do that?

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Jul 27, 2021 @ 15:03
    Huw Reddick
    0

    you can use the memberservice to Get all members

    memberservice.GetAllMembers()

    If you have roles setup you could also use

    memberservice.GetMembersByGroup(groupname)

  • athenasumit 18 posts 69 karma points
    Aug 16, 2021 @ 13:33
    athenasumit
    0

    But this will return all the members. I just want to return only few specific member details.

  • Huw Reddick 1929 posts 6697 karma points MVP 2x c-trib
    Aug 16, 2021 @ 14:31
    Huw Reddick
    0

    you can use a where clause to limit the results.

    List<string> filterMembers = new List<string>();
    memberService.GetAllMembers().Where(x => filterMembers.Contains(x.Name));
    
Please Sign in or register to post replies

Write your reply to:

Draft