Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Set Member group ID variable in template using JavaScript

Jimi Wikman

Recommended Posts

  • Owner

Sometimes you might want to control something based on member groups. One way to do this is to set a variable using JavaScript:

In a template to use just the primary group:

  var groupId = {expression="\IPS\Member::loggedIn()->member_group_id"};

or for all group ids (comma-separated):

  var groupIds = "{expression="implode( ',', \IPS\Member::loggedIn()->groups )"}";


View full record

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

  • Create New...