When people register for my site I want them to either join an existing group or create a new one if it doesn't exist. They can only be a member of one group, and there's only one group type used on the site.
I've got the autocomplete widget set and I want to alter it's functionality so instead of throwing an error message it creates a group. I presume altering og.module is not a good idea as it wouldn't be easy to make my particular changes generic enough to work for lots of use cases so am I right in thinking I would create a custom module to hook into the pre-save functionality of the user entity and do my checking to see if exists, if not then create group and create membership there or is there another way?
I tried using taxonomy as my group content and using a term reference autocomplete field on my user profile, but og doesn't seem to work fully with taxonomy at the moment, and I had other problems with attached field data not saving on taxonomy so gone back to using a node type as my group content type.