Jump to content

Featured Replies

Posted

Hello,

I found this guide:

However it seems to work only with members of the primary group. But what about secondary group? How could I achieve that?

Regards

See the solution in this comment in reply to that guide (inGroup):

 

As an untested example, while I fully pay attention in the first droning Zoom meeting of the day:

{{if \IPS\Member::loggedIn()->inGroup(4,5)}}
	Members with secondary or primary group IDs of 4 and/or 5 are cooler than all the other members. Pass it on.
{{endif}}

 

  • Author

@Paul E. thank you! it works. I apologize, I wouldn't have thought that inGroup was different than member_group_id but I should've tested first. There's also another comment that specifies that it checks for secondary groups too.

16 minutes ago, DanielFb said:

I apologize, I wouldn't have thought that inGroup was different than member_group_id but I should've tested first.

No need to apologize. It seems an oversight that the guide doesn't mention the limitation, or consider all the possible scenarios and provide solutions for each.

  • Primary membergroup only
  • Secondary membergroup only
  • In group(s) and also not in group(s)
  • In any group, regardless if primary or secondary

@Jordan Invision who will either be sick of me or get a raise or both.

Recently Browsing 0

  • No registered users viewing this page.