Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I know how to go about it using code but there's no actual interface to add multiple users to a group at once.
Maybe a custom operation for views bulk operations would suffice?
Comments
Comment #2
kristiaanvandeneyndeI think you can already accomplish this with Rules + VBO.
I'd have to check, but in theory it would require you to make an action that creates a GroupMembership entity, sets the user and group property of it and then saves it.
Please set this to "fixed" if that is the case.
Comment #3
ctrlADelI gave this a look. All the pieces appear to be in place but I'm not familiar enough with rules and vbo to get a working example setup. Will set this to fixed for now.
Comment #5
Bigbozz CreditAttribution: Bigbozz commentedMaybe I can help, I have made such a rule. In the attachment you can see my setup.
The views loop 'lid2' contains the uid's of the users I want to add to the group (its a rule view).
I create a new entity: group membership. I've added three data values to it (group, user and status) and save the entity (Force saving immediately must be set to true!). That must do the trick.
Only problem is that the viewlist must contain only new groupmembers, else you get an database error.
I shall try to fix that later.
Comment #7
P2790 CreditAttribution: P2790 commentedI changed this to documentation, is anyone able to run through how to do this with rules and vbo? Would be helpful thanks!
Comment #8
Pierre.Vriens CreditAttribution: Pierre.Vriens at In Petto commentedThis issue appears to be similar to "How to implement the mass operations on the Group's members page using Views?", which contains an answer with a VBO view and 2 custom Rules Components to block or unblock selected members.
Comment #9
Pierre.Vriens CreditAttribution: Pierre.Vriens at In Petto commentedComment #10
Soul88We thank everyone for their collaboration on this issue, but as the D7 version is no longer supported, we will now close all D7 issues to keep the issue queue a bit tidier. This information won't go anywhere, it just won't show up on the list of open issues anymore.
Please see: https://www.drupal.org/project/group/issues/3163655 and https://www.drupal.org/project/group/issues/3203863#comment-14100281 for more details.