Copied to clipboard

Flag this post as spam?

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


  • Paul Sørensen 302 posts 648 karma points
    Oct 29, 2010 @ 23:51
    Paul Sørensen
    0

    GetMemberByName - how to interpret the new implementation

     

     

    Hi

    I'm trying to get all members from a given group with this

     

    foreach (string name in System.Web.Security.Roles.GetUsersInRole(role))
    ..

     

         How am I then supposed to get the Umbraco Member since GetMemberByName is marked obsolete and the FindUsersByName gives me a MembershipUser. I need to properties on the Umbraco Member.

     

    [Obsolete("Use System.Web.Security.Membership.FindUsersByName(string letter)")]
    public static Member[] GetMemberByName(string usernameToMatch, bool matchByNameInsteadOfLogin)

         I have seen implementations where are Members are traversed one by one and the checked against the name. But I don't suppose that it's the way to do it.

    /Paul S  

     

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Oct 30, 2010 @ 11:06
    Jan Skovgaard
    0

    Hi Paul

    Maybe this post conatins the solution to your problem?

    http://our.umbraco.org/forum/developers/api-questions/2930-Getting-member-name

    /Jan

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Oct 30, 2010 @ 11:11
    Jan Skovgaard
    0

    Hi again

    I think you might also could get some pointers from this.

    Pay attetion to the comments added by Niels and Slace. Especially the latter since he pointed out some performance issues to be aware of.

    /Jan

  • 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