Restrict content by group membership
Introduction
This plugin enables the portions of text to be displayed on account of the current user being a member of specified group(s). This is achieved by surrounding the relevant text with, for example:
{usergroup 5 || 7}...{/usergroup}
or:
{usergroup editor}...{/usergroup}
or:
{usergroup !8}...{/usergroup}
You can specify as many groups as you wish, and they are separated by ||. By default the separator is interpreted as OR. The first group can be preceded by ! which means that the user must NOT be a member of any of the listed groups for the enclosed text to be displayed.
Note that if you want to show something to all logged in users apart from a specific group, you also need to exclude guest as in:
{usergroup ! mygroup || guest}...{/usergroup}
You can use group numbers or group names. If names are used, they must be the actual names in use on your site, which may vary according to the language in use.
The plugin will honour a request referring to public (group 1) but it has no point, since it permits (or refuses) everyone.
Restrict content by group membership
- Version:
- 1.0.0
- Developer:
- Martin Brampton
- Last updated:
-
Mar 14 2024
7 months ago - Date added:
- Nov 19 2022
- License:
- GPLv2 or later
- Type:
- Free download
- Includes:
- p
- Compatibility:
- J3 J4 J5
Share