Copied to clipboard

Flag this post as spam?

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


  • Paul Griffiths 370 posts 1021 karma points
    Jan 13, 2016 @ 11:02
    Paul Griffiths
    0

    SQL Query to list all member groups

    Hi All,

    Has anyone got a query that lists all member groups that have been defined in the Umbraco Back office please?

    The following doesnt return anything when i know that a member group exists that is LIKE 'Abdij'

    SELECT
            uN.text AS MemberGroup
    FROM
            cmsMember2MemberGroup AS m2g
            INNER JOIN umbracoNode AS uN ON m2g.MemberGroup = uN.id
            where uN.text LIKE '%Abdij%'
    

    Many thanks Paul

  • Lee Kelleher 4020 posts 15802 karma points MVP 13x admin c-trib
    Jan 13, 2016 @ 12:44
    Lee Kelleher
    101

    Hi Paul,

    The GUID for a MemberGroup type is "366E63B9-880F-4E13-A61C-98069B029728", so you could try this...

    SELECT
        text
    FROM
        umbracoNode
    WHERE
        nodeObjectType = '366E63B9-880F-4E13-A61C-98069B029728'
        AND text LIKE '%Abdij%'
    ;
    

    I hope this can help.

    For reference all the object type GUIDs are listed in the core code here: Constants-ObjectTypes.cs

    Cheers,
    - Lee

  • Paul Griffiths 370 posts 1021 karma points
    Jan 13, 2016 @ 12:47
    Paul Griffiths
    0

    Hi Lee,

    Perfect! just want i needed.

    p.s that link you provided is very useful indeed :)

    Thanks very much

    Paul

Please Sign in or register to post replies

Write your reply to:

Draft