Copied to clipboard

Flag this post as spam?

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


  • ashwini 43 posts 63 karma points
    May 23, 2012 @ 21:38
    ashwini
    0

    Help with GetMembersByGroupName ....

    I need to list the members of a particular group as in a directory and i came across this extension. I am really glad i found this but i am not able to find much documentation as how to use this function...i have the following code in my xslt

    <xsl:variable name="users" select="umbraco.library:GetMembersByGroupName('Active')"/>

    <xsl:for-each select="$users//member">
        <xsl:value-of select="concat(firstName, ' ', surname)" /><br/>
        <href="/view-profile.aspx?id={@memberID}">View Profile</a>
    </xsl:for-each>

    Is my code wrong ? I thought it should give me the first name and last name of members in Active group...but i am not even able to save the file.

    Can someone please help me with this method ?

    Thanks !

    Ashwini.


  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    May 24, 2012 @ 11:30
    Lee Kelleher
    0

    Hi Ashwini,

    Not sure how you've got your XSLT namespaces set up, initially concerned that you are using the "umbraco.library" prefix for the "ucomponents.members" extensions?

    The "GetMembersByGroupName" function will return a list of member's usernames, nothing else. (Essentially it's a wrapper call to .NET's membership provider method " Roles.GetUsersInRole").

    But now thinking about it, that isn't too helpful. We could add another function to return the full member data... that would be more helpful. Would you mind opening a feature request on our CodePlex site? http://ucomponents.codeplex.com/WorkItem/Create This way we can manage it, etc.

    Thanks, Lee.

  • ashwini 43 posts 63 karma points
    Jun 04, 2012 @ 21:49
    ashwini
    0

    i solved this problem Lee, i wanted the control to return me member properties for a particular member group. So i created a seperate member property for each of different member groups. Adding some if controls and loops to your previous code i was able to achive the result i wanted to...

Please Sign in or register to post replies

Write your reply to:

Draft