Questions tagged [group]

Use it for questions related to the Group module, not the Organic Groups module.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

Workflows within teams or groups

How I go about implementing editorial workflows within a group of users? I have user identified with a taxonomy term, for example, a per country or per team-based group. To simplify configuration and ...
1
vote
0answers
13 views

Prevent access from files with direct url

In the Group module people can upload files if they're group manager. But the thing is, these files should be restricted to the group and everyone who isn't a member may not see this files. The ...
1
vote
1answer
43 views

How do I set a condition to only show a block to members of a group?

I use the Drupal Group module. Is there a way to check if a logged-in user is an groupmember or not when the user visits the grouppage? I have some blocks that should be hidden if an user is not a ...
-1
votes
1answer
18 views

How do I list all names of the same group type?

For a Group type (Birds), I tried to create a View in Drupal 9 to list all groups of that type, but I end up getting a group title entry for every node, for example this list. Birds groups Hawks ...
0
votes
2answers
35 views

How to filter my view of Groups to show results matching Term A or Term B

I am adding taxonomy terms to groups (using the group module) and want to use the terms to filter groups within a view. However, my exposed filters don't seem to work. There is no error, but the ...
1
vote
0answers
55 views

How to ensure that node access check results are enforced everywhere? [closed]

I am trying to do this without hook_node_grants because, for some reason, it messes with the nodes that are being controlled by the 'Group' module. The Group module itself used to use Node grants, but ...
1
vote
1answer
56 views

How to create a message with message stack when user becomes a member of a group module group?

Hi currently I try to code a custom module for notification based on message stack module. Now I'm searching for the event or hook to perform some custom code when the user becomes a member of a group....
0
votes
1answer
31 views

Which hook to use to detect new members added to group?

What is the best way to make a hook that only fires when new members are added to a group? I have a function that exports group memberships to moodle course enrolments. Right now I have it bound to ...
0
votes
1answer
15 views

Get user ids of group members

I want to get a list of all users that are members of a group. I can get the members using getMembers(): $members = $group->getMembers(); foreach ($members as $member) { var_dump($member);...
1
vote
0answers
71 views

Get the ID of the group to which the node is added

Using Drupal 8 with the Group module, I have an action that is run via hook_node_insert that needs to know the group id of the group that the node is added to. Im using this code to get the group id ...
0
votes
0answers
40 views

Collections of custom (ECK) entities

[ Similar question: How to add custom entities to group types? (Drupal Answers). But I ask specifically about ECK entities, not other simpler custom entities ] I want to implement collections of ...
0
votes
0answers
21 views

Complex Group Permissions for Users and Content

My application holds content about projects. Projects have a number of entity reference fields including ones giving them both a team and a region. Projects live inside of units (1-to-1 relationship)...
0
votes
0answers
14 views

How to add a content navigation menu based on taxonomy or parent relation?

We are new to Group module and we can't figure out how to create a content navigation menu/tree we want to place to the left of the group page. We are evaluating generating this menu by taxonomy or ...
0
votes
0answers
26 views

Entity Query returns incorrect results while running functional javascript test

Im writing a functional javascript test for my project where im facing a problem with my feature. I have created a group entity just above it and referencing a parent group. This doesn't work: $...
0
votes
0answers
28 views

How to add the Group Role as body class in the page template

I like to add the Group Role of the currently logged in user to the body class of the page twig template. So this is not the same as the user roles the user account has. Currently using Drupal 9.0.3. ...
0
votes
0answers
48 views

How to limit access to a group page to the group administrator?

I created a custom module to create a /group/ID/tasks page https://www.drupal.org/project/group How to limit access to this page to the group administrator ? If the current user is administrator of ...
0
votes
1answer
36 views

How do I trigger group membership was granted for a user - Group module

I try to use group module in d8. 1. I created a new group type named test 2. I added 2 group as demo with admin is default group_membership. 3. in group 1 (name okok) I edited and added new user to ...
0
votes
1answer
19 views

Get enabled content types machine name

I'm trying to get the enabled content type machine names for a given group. I wrote the following code, but to get the machine name I should cut the strings to group_node:. /** @var \Drupal\...
0
votes
2answers
17 views

How to return a user's group access permissions?

I am trying to block a user from accessing certain content/blocks if they do not have permission to view content of a certain type within a group. I have the user ID and the group ID, but how do I ...
0
votes
2answers
56 views

How to check if current page is a group entity?

Im using drupal 7 and group module I am trying to run some code only if the current page is a group. here is my code <?php $arg = arg(0); $arg1 = arg(1); global $user; if($arg ='group' &&...
0
votes
1answer
21 views

Create Group permission to grant view of all group content

I'm running Drupal 8.7.11 and Group 8.x-1.0-rc5. I have a situation whereby I have > 5,000 groups. The majority of the users are members of 10 groups. However I have a small set of users who need ...
0
votes
0answers
13 views

Group ID not passed to Join button in Views

Using Drupal 7. Group module, and Views. I create a group type, navigate to admin/group/type/manage/[group-type]/display, create a display. There is a field called Membership Action Form, This ...
1
vote
1answer
72 views

How do I add a user to a group?

I am using the Drupal 7 version of the Group module. I found this Drupal 8 code which adds a user to a group, and I can't find anything similar for Drupal 7. use Drupal\Core\Entity\ContentEntityBase; ...
0
votes
0answers
14 views

How do I accepted requested membership without bulk operation?

Using the group module when navigating to group/[id]/members you are present with a list of members, and a bulk selector for updated membership/role status. I am able to create a similar page using ...
0
votes
0answers
10 views

View to display Contents types of groups only if user is member or owner of that group

I am trying to create a view where I can show contents of groups only if user is a member but what I can do is either show all groups where the user is member or show all content of a group. I want to ...
0
votes
1answer
18 views

How do I get the list of permissions?

I am trying to use the group method hasPermission(permission_label, user). I found an example that is the following: $group->hasPersmission('administer members', $user) I would like to know ...
0
votes
1answer
50 views

How can you get the route name/path of groups?

I am new to Drupal 8. I am working on groups module and want to assign different themes to different groups.So i need route name of groups. how to find route name of groups. Thanks in advance. /** ...
0
votes
0answers
39 views

Group id not shown when view is empty in Drupal 8?

I am new to Drupal 8. I make custom view field (programmatically) and pass session variable to it.Session variable contain group id. The problem is that when the view is empty i mean no content in ...
0
votes
1answer
55 views

Getting session variable in view contextual filter drupal 8

I am new to Drupal 8. I get group_id in session variable just like that $_SESSION['groupbysession']['group_id'] = $path[2];. now i want to get that session variable in view Contextual filters.I have ...
0
votes
0answers
11 views

A different set of terms for each group?

I am considering to use de group-module to organize nodes by department. Each department has different taxonomy terms to classify their nodes. The goal is to have them describe their howto's and ...
0
votes
1answer
31 views

drupal 8 modifying the menu items path

I work on an drupal 8 application that use the group module with the restriction of only one group per user. i want to be able to modify the menu items so that the id of the user's group is always in ...
0
votes
1answer
78 views

Explicitly passing argument to local action for access check

I'm using the group module, and in a custom module I'm trying to create a local task that will bring you directly to the create page for a particular group content type. My goal is to skip the create ...
1
vote
0answers
30 views

Sub groups under groups

Anybody has idea about how we can have Sub Groups under Drupal Group? This module; https://www.drupal.org/project/group, will manage grouping of content, users.... perfectly. But we are looking to ...
1
vote
1answer
48 views

Using group and rules modules to automatically create group for new user

I am using the Group (not OG ...) and rules modules for this task. I created group type, Applications Support. Then I created a rule, After saving a new user. Under the rule, I used the following ...
0
votes
1answer
29 views

How to normalize / resolve membership ID to all account UID per group_content

I'm trying to add the owner's membership to every GroupContent. By default ownership is only identified by the Account ID. It seems a Normalizer and/or custom resolver is necessary. Beyond my ...
-1
votes
1answer
125 views

Webform Group Member Composite

I need to create a Webform element that has a list of group members, each with their own checkboxes and text fields ('job description'). I figured out how to display checkable group members through a ...
-2
votes
1answer
60 views

How to make drop down for parent group in view have the name instead of the id as the parameter?

I have a relationship in my view to the content group content, and then I put in an exposed filter for the parent group. But the exposed filter works with the id of the group, I want it to work with ...
2
votes
1answer
303 views

Programmatically remove content from a group

In order to add a node to any group in Drupal 8, I use the following code. $group->addContent($node, 'group_node:article'); Now, for removing content from a group, I have tried $group->...
0
votes
1answer
316 views

Where in the MySQL database schema is the URL alias for a group relation?

I am building a report outside of Drupal that pulls data from a Drupal 8 database. The report shows titles of different nodes and I want to link those titles to the web page for that content. This ...
1
vote
1answer
227 views

How do I add a new group permission?

How to add new group permissions? describes how add new group permissions when using the Drupal 7 version of the module. function [mymodule]_group_permission() { return array( 'schedule ...
0
votes
1answer
49 views

How to use the YML structure of routes to control access to Group Content

I am using the Group module and would like to leverage each Group's permissions in my module's yml files. I have a module.permissions.yml with something like tam_api.group_gid_members_uid: path: ...
7
votes
2answers
7k views

Programmatically get the results of a view

Using the group module in D8, I have the below view with machine name: group_members_per_group Machine Name of: (Member account) User: Full Name is: field_user_full_name (Member account) User: ...
1
vote
1answer
36 views

How to display articles based on group combinations of various group types?

I looked at the group module. Defining permissions based on user and entity memberships would suit my needs very well, but sometimes I would need a combination of various group memberships to define ...
0
votes
2answers
178 views

How are global roles synced with group roles?

How are global roles synced with group roles in the Drupal 8 group module? I expect that the module would either: Create a group roles in each group type for each global role and/or one of the ...
0
votes
1answer
453 views

Organic Groups vs Group - on D7 vs D8?

I've done some research on this question, posted it here without any feedback, and have left messages for OG owner (amitaibu) without any response, so hopefully I can solicit useful feedback here. I'...
0
votes
1answer
52 views

Relate Content to a Group feature when creating a node outside a group

In my drupal site, I'm using the Group module. My problem: I created a regular Drupal node type, let's call it userpost I created a group type called "usergroup" The content type "userpost" is ...
2
votes
1answer
233 views

Use node edit form layout for other entity types

The node edit form got a nice overhaul for Drupal 8's default admin theme, whereby a lot of the metadata fields like Revisions, Meta Tags, URL Aliases, Publish status, Promote status, etc are moved ...
0
votes
1answer
49 views

Groups and Private File Visibiility

I have created a content type Agenda - the body is paragraphs - there are two types: (1) Text and public files and (2) Private Files. The fields work properly - Anonymous cannot see Private Files. ...
2
votes
2answers
116 views

How to translate Groups in a multilingual site?

I have created a new grouptype and added some fields to have a "site". And then created a new group with this grouptype. I edited the overview site with some information. Now I would like to translate ...
1
vote
1answer
47 views

How to create entity relation of counselor to client?

I'm trying to create a relation in D8 between a counselor and clients. The counselor would have to record counseling hours for each client. I've looked at the group module, even building the ...