Restrict Content by Username Plugin

Submitted On: 19 Nov 2022
File Size: 10
Downloads: 10
File Version: 1.0.0

The Black Sheep Research Plugin for selecting content by user groups in Joomla

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:

{user_group 5 || 7}...{/user_group}


{user_group editor}...{/user_group}


{user_group !8}...{/user_group}

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:

{user_group ! mygroup || guest}...{/user_group}

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.

File Rating (0/0)
Log in to cast your vote
Be the first to comment! Please sign in or register.