ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Tailoring experience to Member Group

June 22, 2007 10:51am

Subscribe [2]
  • #1 / Jun 22, 2007 10:51am

    hothousegraphix

    851 posts

    I’m not finding too much information on this particular subject.

    I’m interested in setting up my visitors viewing experience based on the Member Group they’ve been assigned to; e.g:

    If not logged in - users will see a default view and have limited access with some sections requiring user login prior to viewing.

    If logged in - users will see the default view plus have additional access to sections designed for their particular Member Group.

    Does EE have a built in ability to evaluate for Member Group Name, or will I be evaluating for the"group_id”? Can this be done via EE conditionals, or will this have to be achieved with some additional PHP?

    I’ve found only one thread here that discusses an issue fairly close to what I’d like to accomplish. Could someone shed some light on this for me.

    Thanks Much!

    Moved to HowTo by Moderator

  • #2 / Jun 22, 2007 10:54am

    hothousegraphix

    851 posts

    I apologize, I should have probably posted this thread to the How-to forum.

  • #3 / Jun 22, 2007 11:18am

    silenz

    1651 posts

    Does EE have a built in ability to evaluate for Member Group Name, or will I be evaluating for the"group_id”? Can this be done via EE conditionals, or will this have to be achieved with some additional PHP?

    There’s a global variable named {member_group} which holds the member group_id of the currently logged-in user.

    So something like this should work for you:

    {if member_group == "5"}
      If he belongs to Member Group 5 do this.
    {if:elseif member_group == "6"}
      If he belongs to Member Group 6 do this.
    {if:else}
      Else do this.
    {/if}
  • #4 / Jun 22, 2007 11:29am

    hothousegraphix

    851 posts

    Thanks,

    This will be very helpful.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases