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?

CommentFileSizeAuthor
#5 rules.png38.1 KBBigbozz
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ctrlADel created an issue. See original summary.

kristiaanvandeneynde’s picture

I 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.

ctrlADel’s picture

Status: Active » Fixed

I 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Bigbozz’s picture

Status: Closed (fixed) » Fixed
FileSize
38.1 KB

Maybe 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

P2790’s picture

Component: Group (group) » Documentation
Category: Feature request » Support request
Priority: Normal » Minor
Status: Closed (fixed) » Active

I changed this to documentation, is anyone able to run through how to do this with rules and vbo? Would be helpful thanks!

Pierre.Vriens’s picture

Issue summary: View changes

This 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.

Pierre.Vriens’s picture

Title: Bulk adding users to a group » How to bulk add users to a group using custom VBO-actions?
Priority: Minor » Normal
Soul88’s picture

Status: Active » Closed (outdated)

We 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.