This conditional allows you to tap into BoltWire's group membership system to see if a person is in a specified group.
The first parameter (or parameter 'group') determines which group is checked. It is required.
The second parameter (or paramter 'id') usually refers to a page and defaults to the current user.
Here are some examples of how this works
[if ingroup admin]true[else]false[if]
[if ingroup group=admin]true[else]false[if]
checks if current user is in the admin group
[if ingroup admin bob]true[else]false[if]
[if ingroup admin id=bob]true[else]false[if]
[if ingroup group=admin id=bob]true[else]false[if]
checks if bob is in the admin group
Note: This script will check for the current user instead of bob because bob is in the first parameter position rather than the second.
[if ingroup group=admin bob]true[else]false[if]
This conditional allows you to check multiple groups by supplying a comma separated list of groups. The following will return true if the current user is in any of specified groups.
[if ingroup admin,editor,chessclub]true[else]false[if]
Note: spaces in your group list will produce unexpected results unless they are enclosed in quote marks. The first two below are equivalent to the markup above. The third will fail.
[if ingroup 'admin, editor, chessclub']true[else]false[if]
[if ingroup group='admin, editor, chessclub']true[else]false[if]
[if ingroup admin, editor, chessclub]true[else]false[if]
You can create any groups you wish in BoltWire. Just create a page (ie group.chessclub) and then list member ids on the page. It's very easy to setup up forms to add and remove members as desired.
Note: A person must login for group memberships permissions to go into effect--but this condition does not wait for that. In other words, if you add someone to a group that is already logged in and you immediately check their memberships, the conditional will return true, but they will not have any permissions associated with that group until they log out and back in.