I'm setting up a site where I only want people to be able to create or join a single group.

Limiting creation is easy. I created a module "tester" and used hook_form_alter that, when a user attempts to create a new group, it checks if the user is already in a group and, if so, uses drupal_goto('error_page') to redirect them from the node/add form.

This does not work, however, with joining a group. drupal_goto() simply returns to the same page, with no error messages to speak of. I've tried doing this in hook_menu and the same thing happens. In the attached code the first drupal_goto doesn't work, but the second does:

http://pastebin.com/f297242c4

hook_og only gets fired AFTER a subscription occurs so there doesn't seem to be a way to use that either.

Anyone have any other ideas? I can hack og.module easy enough but, well, that wouldn't be very nice...