Copied to clipboard

Flag this post as spam?

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


  • Samuel Hamer 44 posts 66 karma points
    Feb 21, 2011 @ 12:35
    Samuel Hamer
    0

    Getting member groups from member id (or any other method)

    Hi, has anyone found a good method for finding out what member groups the current member belongs to from the xslt level?  I had a look and found a work around from 2 years ago but was wondering if a better solution had been found, or whether a function had been added to the library that I am just unable to find.

    Basically I have some properties on a page that I only want to be displayed if someone is a member of the 'Staff' member group.  Open to suggestions on other methods of doing this also.

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Feb 28, 2011 @ 14:37
    Lee Kelleher
    1

    Hi Samuel,

    We have an few XSLT extensions in uComponents for member groups...

    http://ucomponents.codeplex.com/wikipage?title=Members

    To find out if a member is part of a group... (returns boolean)

    IsMemberOfAGroup(string groupName, int memberId)

    or to get a list of all the groups that a specific member belongs to... (returns an XML nodeset)

    GetGroupsByMemberId(int memberId)

    If you have any questions - let me know.

    Cheers, Lee.

  • Samuel Hamer 44 posts 66 karma points
    Mar 09, 2011 @ 15:27
    Samuel Hamer
    0

    thanks Lee!

Please Sign in or register to post replies

Write your reply to:

Draft