Groups

Groups is a WordPress plugin that provides group-based user membership management, group-based capabilities and content access control. It integrates standard WordPress capabilities and application-specific capabilities along with an extensive API.

Extensions

New Groups Restrict Categories and Groups Import Export.

  • Groups 404 Redirect allows to redirect visits to pages that are protected by Groups.
  • Groups Blog Protect restricts access to blogs based on group membership.
  • Groups File Access Groups File Access is an extension that allows to provide file download links for authorized users. Access to files is restricted to users by their group membership.
  • Groups Forums provides a powerful and yet light-weight forum system for WordPress sites.
  • Groups Gravity Forms allows to add users to groups automatically, based on form submissions.
  • Groups Import Export – An import and export extension for Groups.
  • Groups Jigoshop Groups integration for Jigoshop that supports memberships and subscriptions.
  • Groups Newsletters helps you to communicate efficiently, providing targeted information to groups of recipients through automated campaigns.
  • Groups Notifications allows to send automatic notifications to group members and the site administrator.
  • Groups PayPal – Sell memberships and subscriptions with Groups and PayPal.
  • Groups Restrict Categories features access restrictions for categories, tags and other WordPress taxonomies, including support for custom post types and taxonomies.
  • Groups Restrict Comments Pro This extension for Groups allows to restrict who can post or read comments based on a user鈥檚 group membership.
  • Groups Subscriptions is a subscription framework for Groups.
  • Groups WooCommerce Groups for WooCommerce is a WordPress plugin that allows you to sell memberships.
  • WooCommerce Group Coupons This extension for WooCommerce uses Groups and WordPress roles to limit the validity of coupons.
  • WooCommerce Groups Newsletters The WooCommerce Groups Newsletters extension lets customers subscribe to newsletters at checkout.

Features

User groups

  • Supports an unlimited number of groups
  • Provides a Registered group which is automatically maintained
  • Users can be assigned to any group
  • Users are added automatically to the Registered group

Groups hierarchy

  • Supports group hierarchies with capability inheritance

Group capabilities

  • Integrates standard WordPress capabilities which can be assigned to groups and users
  • Supports custom capabilities: allows to define new capabilities for usage in plugins and web applications
  • Users inherit capabilities of the groups they belong to
  • Groups inherit capabilities of their parent groups

Access control

  • Built-in access control that allows to restrict access to posts, pages and custom content types to specific groups and users only
  • control access to content by groups: shortcodes allow to control who can access content on posts, show parts to members of certain groups or to those who are not members Shortcodes: [groups_member], [groups_non_member]
  • control access to content by capabilities: show (or do not show) content to users who have certain capabilities Shortcodes: [groups_can], [groups_can_not]

Easy user interface

  • integrates nicely with the standard WordPress Users menu
  • provides an intuitive Groups menu
  • conceptually clean views showing the essentials
  • quick filters
  • bulk-actions where needed, for example apply capabilities to groups, bulk-add users to groups, bulk-remove users from groups

Sensible options

  • administrator overrides can be turned off
  • optional tree view for groups can be shown only when needed
  • provides its own set of permissions
  • cleans up after testing with a “delete all plugin data” option

Access Control

Groups defines some capabilities of its own. The groups_read_post capability is used to restrict access to certain posts or pages to groups (and users) with that capability only.

Framework

  • Solid and sound data-model with a complete API that allows developers to create group-oriented web applications and plugins

Multisite

  • All features are supported independently for each blog in multisite installations

Your opinion counts

You & Groups

Beta-testers and developers who need to integrate group-based features in their plugins and web applications: please use it and provide your feedback.

Feedback

Feedback is welcome!

If you need help, have problems, want to leave feedback or want to provide constructive criticism, please do so here at the Groups plugin page.

Please try to solve problems there before you rate this plugin or say it doesn’t work. There goes a lot of work into providing you with free quality plugins! Please appreciate that and help with your feedback. Thanks!

Twitter

Follow me on Twitter for updates on this and other plugins.

Introduction

Content Access Control

Access restrictions on posts

On posts an pages (and custom content types) a new meta box titles Access restrictions appears. By checking Enforce read access, you can restrict access to the post to groups and users who have the groups_read_post capability. You need to assign this capability to a group and make users members of that group to allow them to see those posts.

Content visibility for members and non-members

The [groups_member] and [groups_non_member] shortcodes are used to limit visibility of content to users who are members of a group or users who are not members of a group. Multiple comma-separated groups can be specified.

Example: Limiting visibility of enclosed content to registered users.

[groups_member group="Registered"]

Only registered users can see this text.

[/groups_member]

Content visibility based on capabilities

The [groups_can] and [groups_can_not] shortcodes limit visibility of enclosed content to those users who have the capability or those who do not have it. Multiple capabilities can be given.

Example: Showing enclosed content to users who can edit_posts (standard WordPress capability).

[groups_can capability=”edit_posts”]

You can see this only if you have the edit_posts capability.

[/groups_can]

Integration in the ‘Users’ menu:

Users – group membership is managed from the standard Users admin view. Users are automatically added to the Registered group. You can add multiple users to other groups here and also remove them.

Sections in the ‘Groups’ menu:

Groups

Here you can:

  • add groups
  • remove groups
  • assign capabilities to groups

Capabilities

This is where you add, remove and manage capabilities.

Capabilities can be assigned to groups and users (1). These capabilities include the standard WordPress capabilities but you can also define additional capabilities for your web-application.

Groups defines some capabilities of its own. The groups_read_post capability is used to restrict access to certain posts or pages to groups (and users) with that capability only.

(1) Assigning capabilities to users is not integrated in the user interface yet but can be done through API calls.

Options

Administrator override :

Administrator overrides can be turned off.

Permissions :

For each role these permissions can be set:

  • Access Groups: see information related to Groups.
  • Administer Groups: complete control over everything related to Groups.
  • Administer Groups plugin options: grants access to make changes on the Groups > Options admin section.

Testing the plugin :

A convenient option is provided to delete all data that has been stored by the Groups plugin. This option is useful if you just need to start from fresh after you have been testing the plugin.

Shortcodes

Please visit the documentation page on shortcodes for up-to-date information: Groups Shortcodes

Download

Download the Groups plugin on WordPress.

2,049 Responses to Groups

  1. Iain December 7, 2016 at 11:33 am #

    Hey there,

    I need a plugin that will create WP groups. Of course this one is the best. But I also need it to make users from particular groups login with either their email address or username.

    Can I make a particular group need to log in with their user name and another group log in with their email address?

    Thank you!

    • Kento December 10, 2016 at 4:25 pm #

      Hi Iain,

      Thanks for considering Groups for your purposes 馃檪 Regarding the login, if it were just for everyone, this plugin could be useful WP Email Login and it could be adapted to allow this for only users of certain groups with some modifications. Are you able to do that?

      Cheers

  2. Jeremy A Muckel December 15, 2016 at 7:37 pm #

    Hello,

    This seems obvious so maybe there is functionality for this and I’m not seeing it, but instead of creating a new user, then going to edit user, then adding them to their group, why is there not a dropdown or something of groups right on the add user page?

    My client is saying it is annoying to have to make the user then go into edit and choose a group. They would like to add the user and select their group all in one step. How can this be accomplished?

    Thank you for your time. Otherwise this plugin is amazing!

  3. Jeremy A Muckel December 19, 2016 at 2:34 pm #

    Is there a way to choose a Group on the create user screen? My client would rather not have to create the user, and then go to list users, and then select a group.

    • antonio December 20, 2016 at 9:06 am #

      Hi Jeremy,
      This option is not available if you create the user from the dashboard. If you want to assign automatically the new users to a group, you can use this code, adding the code in your functions.php child theme file.
      If you want that the users can choose the group when they are registering, you have available the Groups User Chooses plugin.
      Kind Regards,
      Antonio B.

  4. Mahlon December 24, 2016 at 2:58 am #

    How do I add a user to a group? When setting up a new user I see where you can select which role but there’s no option for group

    • Kento December 24, 2016 at 5:29 pm #

      Hi Mahlon,

      First create the new user and then edit to assign to the group. We’ll have this improved in a new release where you should be able to do it directly upon user creation, but due to technicals this isn’t possible until after the user has been created.

      Cheers

  5. David December 27, 2016 at 4:03 am #

    Love Groups and have purchased several extensions. But I’m moving from WooCommerce to SamCart. Do you have any integration with SamCart and/or Zapier or IFTTT?

    • antonio December 27, 2016 at 8:34 am #

      Thanks David,
      Sorry there isn’t integration for this cart.
      Kind Regards,
      Antonio B.

  6. John December 29, 2016 at 9:28 pm #

    Does this plugin support custom group-specific fields, e.g. group name, group location, etc.?

    • antonio December 30, 2016 at 6:58 am #

      Hi John,
      Sorry, exactly I don’t know what do you mean, maybe the documentation page can help you.
      Kind Regards,
      Antonio B.

  7. Dave January 2, 2017 at 7:18 am #

    I’m looking for a way to update a user and the groups they are in.

    Example:
    user@user.com has been in the system for awhile and he is part of certain groups:
    Group A
    Group B
    I now want to update the user to have access to Group C as well.
    I don’t want to do this in the dashboard, and will build a page for our sales team to make these changes through a form.
    I thought [groups_join] would help, but not seeing how that works.

    I use gravity forms to register new users and add them to groups, but updating only works for users who are logged in.

    Any advice would be a huge help,

    Thanks

    • antonio January 4, 2017 at 8:48 am #

      Hi Dave,
      Using [groups_join group="XX"] (where XX is your group C number) in a page, if a logged user visits this page, he will see a button for join to this group. If a guest user or an user in group C visits this page, then he will not see anything.
      Kind Regards,
      Antonio B.

      • Dave January 5, 2017 at 4:09 am #

        Thanks Antonio,

        The problem with that is I, don’t want the user to be able to change their access, I want a sales person to change the users access with a form. I have a page with modals that lead to different sections of the website. You can see the modals you have permission to see, based on the groups you are part of.

        So… something like this shortcode:
        // echo do_shortcode( ‘[groups_user_groups user_id='.$user_id.']‘);
        Where I can see the groups that a user is a part of.

        I want something like this:
        // echo do_shortcode( ‘[groups_join group='Group_C' user_id='.$user_id.']‘);
        Adding a user to a soecific group.
        I decide (or a sales person), what users can join Group C. Not in the dashboard, but through a webpage with checkboxes.

        Is this fathomable?

        Thanks again for any help.

        Dave

        • antonio January 11, 2017 at 11:13 am #

          Hi Dave,
          I have created this ‘groups_join_user’ shortcode. I hope this can help you.
          Kind Regards,
          Antonio B.

          • Dave January 17, 2017 at 5:24 pm #

            Thank You Antonio!!!!

  8. Max January 5, 2017 at 3:02 pm #

    Dear Groups Team,

    i am using your WP plugin and am a big fan so far but I have a problem and hope you can help me.

    I would like to convert an unrestricted site into a site that can only be seen if registered and logged in. If a not registered user enters the site he should see the text “please register and log in to access the site”. I was able to set this up correctly using the shortcodes below.

    ———————————–
    [groups_login]

    [groups_non_member group="Registered"]
    please register and log in to access the site
    [/groups_non_member]

    [groups_member group="Registered"]
    Entire content of the website
    [/groups_member]
    ————————————

    So far so good. My problem happens once I try to expand this to show the content of a website only to a certain group or a group with a certain kapability.
    So in addition to showing the site only to registered and logged in members (showing the “pls register and log in” text if not)I would like to show the site only to members of a group or groups who own a certain capability only.
    If the user is registered and logged in and member of the group he should be able to see the content of the site. If he is registered, logged in but no member of the group he should see the text “sorry, your do not have access to this content.”
    Of course this user should only see this message and none of the page content, vice versa a logged in member of this group should not see this message in addition to the page content.

    I tried this using the groups_member and groups_can short codes below, but this did not work.

    groups_member:

    ————————————–
    [groups_login]

    [groups_non_member group="Registered"]
    please register and log in to access the site
    [/groups_non_member]

    [groups_member group="Registered"]

    [groups_non_member group="Manager"]
    sorry, your do not have access to this content.
    [/groups_non_member]

    [groups_member group="Manager"]

    [/groups_member]
    —————————————-

    Problem: the logged in authorised user (manager group) will see the content of the page but still see the shortcode text “[groups_member group="Manager"]” displayed on top of the content as if it would be part of the content. The logged in but not authorised user will see correclty see the message “sorry, your do not have access to this content.” but in addition will see the shortcode “[groups_member group="Manager"]” displayed on top of the content as if it would be part of the content. In addition he sees all the content of the website, which we tried to prevent.

    —————————————-
    the same problems happen when i close with two shortcodes on the bottom like

    [/groups_member][/groups_member]

    to close the group “registered” and the group “manager”
    ——————————————————

    When using the groups_can shortcode, like below I pretty much have the same issues.

    ——————————————-
    [groups_login]

    [groups_non_member group="Registered"]
    please register and log in to access the site
    [/groups_non_member]

    [groups_member group="Registered"]

    [groups_can_not capability=鈥渟ee_home鈥漖
    sorry, your do not have access to this content.
    [/groups_can_not]

    [groups_can capability="see_home"]
    sorry, your do not have access to this content.
    [/groups_can]

    [/groups_member]
    ———————————————-

    Please let me know if you know what my error is or if you have a suggestion on how to tackle this issue. I understand that different groups can be combined in one shortcode separated by a comma like [groups_member group="Registered,Management"], but content would be shown as soon as a user is member one either one of those groups. If there is a way of showing content only to users who are part of both groups and restricting content to users only part of one group this might be a solution.

    Sorry for the length of my posting, I am just trying to be precise and give the relevant input. Your help would be highly apreciated.

    Thank you,
    Max

    • Max January 5, 2017 at 4:31 pm #

      The best workaround so far is setting it up like below but in that case the phrase “you do not have access to this content” shows when the user is logged in and not authorised (good) but also when he is logged out (bad as he should be asked to log in only here).

      [groups_login]
      [groups_non_member group="Registered"]
      please log in
      [/groups_non_member]

      [groups_can_not capability="see_home"]
      you do not have access to this content
      [/groups_can_not]

      [groups_can capability="see_home"]
      content of the entire site
      [/groups_can]

    • antonio January 13, 2017 at 10:14 am #

      Hi Max,
      You can use the conjunctive version of the groups_member shortcode: groups_cmember.
      Kind Regards,
      Antonio B.

      • Max January 19, 2017 at 11:34 am #

        HI Antonio,

        thank you for your answer, this might be a solution. so the code you have to add anywhere in my theme麓s function.php correct?

        Once done I would be able to use the short code like:

        [groups_member group="Advanced,Premium"]
        Only Members both Advanced and the Premium groups can see this.
        [/groups_member]

        members of only one group, either advanced or premium or none of the groups would not see the message correct?

        Best regards,
        Max

        • Max January 19, 2017 at 11:35 am #

          sorry, i meant [groups_cmember group=”Advanced,Premium”] not groups_member

        • antonio January 21, 2017 at 7:06 am #

          Hi,
          Yes, you need to add this code in your functions.php child theme file.
          Exactly, only the users who are in both groups can see the content.
          Kind Regards,
          Antonio B.

          • Max January 25, 2017 at 10:56 am #

            Hi Antonio,

            thank you for this fix.

            Best regards,
            Max

  9. Michelangelo January 16, 2017 at 9:41 am #

    Hi,
    the link to documentation (http://docs.itthinx.com/) is broken: 502 Bad Gateway
    Can you check, please?
    Thanks

    • antonio January 16, 2017 at 11:16 am #

      Hi Michel Angelo,
      It is now available. Thanks for letting me know.
      Kind Regards,
      Antonio B.

  10. Michelangelo January 16, 2017 at 10:06 am #

    Hi,
    there is a way to add a post to a group via API?
    Should I use Groups_Post_Access::create?
    thanks

    • antonio January 16, 2017 at 11:27 am #

      Hi,
      Yes, you can use this function, but remember that this is based on capability name.
      Kind Regards,
      Antonio B.

      • Michelangelo January 16, 2017 at 11:45 am #

        Hi Antonio,
        no, I need to add a post to a group via API like as I can do manually when I publish a new post.
        thanks
        michelangelo

        • antonio January 17, 2017 at 7:33 am #

          Hi,
          With if your group has this capability, then with this function you can add access to this group (really the posts access work with capabilities).
          Kind Regards,
          Antonio B.

  11. Bengt January 17, 2017 at 5:25 pm #

    I need to add a custom field for a group, description textarea is already there, I need to add a new field, cant find a way with api, is gris possible?

    • antonio January 18, 2017 at 8:42 am #

      Hi Bengt,
      Sorry this feature is not available.
      Kind Regards,
      Antonio B.

  12. Paul Keene January 18, 2017 at 9:51 pm #

    Hi there, I am having an issue with the groups plugin. I am now no longer able to edit a user’s groups when previously I was … attached is a screenshot …

    http://imgur.com/a/V1oAG

    The Edit Groups link is not a link, and as such I am unable to correctly administer our members.

    • antonio January 19, 2017 at 6:42 am #

      Hi Paul,
      That does not seem to be part of our plugin. Please check if you are using another plugin.
      Kind Regards,
      Antonio B.

      • Paul Keene January 23, 2017 at 4:06 pm #

        Hi there Antonio, thanks for your response – apologies for not seeing it until now.

        I can assure you that I am only using your Groups plugin alongside Woocommerce Groups integration.

        • antonio January 24, 2017 at 10:12 am #

          Hi Paul,
          Please send me dashboard admin access to antonio[at]itthinx[dot]com indicating this conversation, and I’ll have a look at your settings.
          Kind Regards,
          Antonio B.

  13. Michelangelo January 20, 2017 at 11:27 am #

    Hi,
    there is an API to get all the capabilities?
    thanks

    • antonio January 21, 2017 at 6:50 am #

      Hi Michelangelo,
      You can use this code.
      Kind Regards,
      Antonio B.

  14. Paul P January 24, 2017 at 10:12 pm #

    We need to have a fractional discount for a specific group (i.e. 30.5% discount). When I add “0.305” to the Group Pricing section in WooCommerce, the resulting price rounds down (or up) but I can not get the specific price I need. Is there a way to turn off rounding in your code?

  15. Bruno January 29, 2017 at 7:41 pm #

    Hello,

    Is it also possible to restrict BuddyPress Groups and forums with Groups?

    Thank you and best regards, Bruno

    • antonio January 30, 2017 at 7:09 am #

      Hi Bruno,
      I’m trying to restrict BuddyPress groups, but it seems they are not compatible. If you need to restrict bbPress forums, you have available the Groups bbPress extension.
      Kind Regards,
      Antonio B.

  16. Max February 2, 2017 at 1:44 pm #

    Hi Antonio & Kento,

    I changed the datablase prefix “wp_” to something else for security reasons.
    So far I used Groups so far by running different user groups with different capabilities and restricting them. Recently It seems I cannot create new capabilities and add capabilities to existing groups. I suppose it is related to having a new database table prefix. Are you aware of this issue and do you know how I could fix it, since I would like to keep the new prefix and increase the security of my site?

    Thank you for your support,
    Max

    • antonio February 3, 2017 at 12:19 pm #

      Hi Max,
      This should not be a problem.
      You could try to enable the WordPress debug, editing the wp-config.php and replacing the following line
      define('WP_DEBUG', false );
      with these lines
      define('WP_DEBUG', true );
      define('WP_DEBUG_DISPLAY', false);
      define('WP_DEBUG_LOG', true );

      Then try to add new capabilities and assign capabilities to groups. If errors exist then a file named debug.log under wp-content folder will be created.
      Maybe you can see more data in this debug file.
      Kind Regards,
      Antonio B.

      • Max February 3, 2017 at 6:32 pm #

        Hi Antonio,

        thank you for this information, I did this and did get a debug.log file created indeed. When opening it with my text editor I get hundreds of lines of process information. I am not experienced enough to know what I would be looking for. I understand you cannot extend your support to that level but do you have a hint on what I should be looking for? The search therm “groups” is found many times.

        Thank you for your support,
        Max

        • antonio February 6, 2017 at 6:47 am #

          Hi Max,
          please delete this file, and try again to create the capabilities. Then send me the file to antonio[at]itthinx[dot]com and I’ll have a look at this.
          Thanks,
          Antonio B.

          • Max February 7, 2017 at 5:39 pm #

            Hi Antonio,

            i sent you the file per mail. Please let me know if you would need anything else.

            Best regards,
            Max

            • antonio February 8, 2017 at 8:53 am #

              Thanks, answered by email.

  17. Len February 4, 2017 at 4:23 pm #

    We installed the groups plugin on both our staging and live sites and activated both. We can add groups just fine on both. We can assign users to the groups on the staging site but not on the live. on the live site the groups assignment does not appear on the user profile

    • Kento February 5, 2017 at 8:51 pm #

      Hi Len,

      There is an option to show groups in user profiles. You probably don’t have it activated on the live site – you’ll find it on your Dashboard under Groups > Options.

      Cheers

  18. Sally February 21, 2017 at 4:43 pm #

    Hi There

    I use the Groups plugin and I’d like to link any new user when they register with my email automation service – convertkit. I have set up a webhook and and a “zap” through zapier.com to do this. However, the first name of the user is not always transferred correctly when they register.

    Any thoughts on how to proceed?

    • antonio February 22, 2017 at 8:59 am #

      Hi Sally,
      Really this is not a question about Groups, I suppose that using get_userdata you can do it.
      Kind Regards,
      Antonio B.

  19. Camden February 22, 2017 at 6:13 am #

    Is there a feature where customers make their own groups?

    • antonio February 22, 2017 at 7:22 am #

      Hi Camden,
      From Groups->Options you can add permissions to roles, maybe this can help you.
      Kind Regards,
      Antonio B.

Leave a Reply