To Group Or Not To Group

I'm working on a project that basically has the following requirements:

a. On registration, a new "group" is automatically generated for the user.

b. The user can then invite additional users to join their new group.

c. When additional user successfully registers, they're automatically added to the previously created group.

Organic groups gives me a core group engine, and the group codes plug-in is a possible solution for (b) and (c) above.

However, I haven't found a hook for autogenerating users on registration (advice appreciated). I'm also fairly certain that I don't want users to be able to create new groups beyond those that are auto-generated at registration, so I'm not really sure OG is the way to go to begin with.

In addition to the auto-generation/registration inquiry above, does anyone have similar experiences or insight to share?

Thanks in advance for your time!

well, not sure but mandatory group could be one way

zilla - March 19, 2008 - 02:35

mandatory OG: http://drupal.org/project/og_mandatory_group
or multiple mandatory OG's by role: http://drupal.org/project/og_multiple_mandatory_groups_by_role

these could force people into a group called, "you must create a new group now that you've registered or i'll use the notifications module to pester you with email reminders every 4 hours for the rest of your life"

the simple instructions could be: create a group, then request a role change (modules can do this automagically) and once hte user role changes, he/she is dinged from that mandatory group

as for group for each user, not sure why you would do this - what on earth could every single registered user on the site need his/her own OG for? then why would they join other groups? can you elaborate?

thanks, zilla

FubarThePanda - March 19, 2008 - 16:53

Regarding the requirements, most of the users won't be getting their own groups, it's just a small set of premium users that will have this option.

We're already using a custom registration process that uses pageroutes to fork the workflow based on account types, so perhaps the easiest thing to do would be to use a variation on the mandatory groups to force the user to create the group as the last step in the registration process as you suggest.

Either that or we might simply write a small hook to simply auto-create the group, assuming that one doesn't exist.

Follow-Up

FubarThePanda - April 11, 2008 - 16:05

Quick follow-up. We decided not to use Organic Groups for this as the requirements were very focused on having simple user groupings that didn't require any of the real benefits of OG (we implemented our requirements in a custom module). That said, we do plan to use OG in a future phase when we allow users to create and manage their own groups, which is really what OG is designed for in the first place.

how did you simulate the groupings???

zilla - April 11, 2008 - 16:37

@fubar - how did you decide to create the groupings for users without using OG? i'm very curious...interested in a very lightweight approach to group myself, though about tags as one option, not sure if there's a simple way via a node approach or other...very curious to hear how you decided to approach it yourself...any insights appreciated.
thanks

........................................................................
i love to waste time: http://twitter.com/passingnotes

re: how did you simulate the groupings???

FubarThePanda - April 15, 2008 - 20:43

Brute force:

a. We created custom groups and groups/users tables.
b. Created the groups/user mappings dynamically at registration
c. Store the group information in the session on login.
d. Have utilities for returning users within a specified group for custom modules that need them.

Our requirements are very specialized, so this didn't amount to a lot of work. We also need to integrate with a third-party application outside of Drupal, so extending the database schema actually makes that integrate somewhat easier.

 
 

Drupal is a registered trademark of Dries Buytaert.