Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

quebecstudio/usergroupfield

Repository files navigation

Usergroup Field plugin for Craft CMS

Usergroups selection as checkboxes

Installation

To install Usergroup Field, follow these steps:

  1. Download & unzip the file and place the usergroupfield directory into your craft/plugins directory
  2. -OR- do a git clone https://github.com/quebecstudio/usergroupfield.git directly into your craft/plugins folder. You can then update it with git pull
  3. -OR- install with Composer via composer require quebecstudio/usergroupfield
  4. Install plugin in the Craft Control Panel under Settings > Plugins
  5. The plugin folder should be named usergroupfield for Craft to see it. GitHub recently started appending -master (the branch name) to the name of the folder for zip file downloads.

Usergroup Field works on Craft 2.4.x and Craft 2.5.x.

Usergroup Field Overview

Add usergroup selection to entries, categories or assets for special features ex: Prevent some entries to be shown for specific users.

Templating

To verify if a usergroup is selected within the field:

{% if currentUser.groups|intersect(myentry.myusergroupfield) %}
    {# do something with myentry... #}
{% endif %}

Usergroup Field Roadmap

  • Add settings to show all groups or only specific groups in the field.

Plugin development by Québec Studio

Icon designed by Madebyoliver from Flaticon