Add/Subscribe Users To Groups Via Link, Block Or Custom Module?

Events happening in the community are now at Drupal community events on www.drupal.org.
dustinrwh's picture

Hello!

I'm looking for a little guidance and help for organic groups. I'd like to be able to add users via link, custom block or custom module. The reason for this is that the administrators of a site I'm developing need to be able to easily add users groups (I don't want them to have to go to the group and add people manually). I'm using Drupal 7.

Right now I have a View (which is a simple table) that displays several users and their rating for a particular group. The administrators will then look through the "candidates" and assign some of them to be a part of that group. The ideal way to do this would be to have a link or button within the View that would assign the user on that row to the given group. Is this possible? If so, what do I need to do to get this to work.

Another option, obviously, is to create a custom module that would allow me to do this. One example is openatrium shown on a test site here: http://drupal.besuccessfulonline.biz/projecta1/members
If this is the most feasible thing to do, what is the best way to understand how organic groups assigns users to groups and how I could do this?

Any help is appreciated,

Dustin

Comments

Similar struggle

nicodv's picture

I'm in the same type of problem right now. I'm not sure if this is the best answer but the way I'm doing it is by using page manager to build the group manager pages, then add views panes to that page showing a list of the members built with VBO operation to each member (ot to all at the same time) and then in the operations selector (dropdown) i show custom actions made in rules as components. So the administrator can select one or all the users and perform an action.

I guess this theory of mine can be adapted to your problem by listing those users and then, the custom vbo operation must do "add entity to a group" (or subscribe it, try both) and when you choose a user and perform that action, the administrator will be able to choose to what group he/she wants to add it to?

Hope I explained it well and also that it helped a bit, if not, don't forget to post your solution so I can maybe rethink mine.

good luck

nico

Could you write it in a short

JohnnyX's picture

Could you write it in a short howto?

Any new ideas or modules to realize that?

I also need a simple way to

JohnnyX's picture

I also need a simple way to add users to (own) groups. G+ circles like (checkboxes with the own circles next to the user (avatar or at the profile site).

@nicodv
I also thought about a vbo solution, but don't know how a can implement a vbo action to add/ remove users from organic groups (7.x.2.x).
I haven't work with vbo before. I'll try it like you suggested :)

Organic groups

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week