Adding users to organic groups in CiviCRM I have a site which uses Organic Groups, specifically with CiviCRM. I want to add a user to a group and I am having issues. The group is marked as closed. I want to how to either 


add a user to a existing group
open up a closed group


I haven't been able to figure out how to do either of these.
As @Graham says in his comment, you may want to use the CiviCRM OG Sync module provided with CiviCRM. If your interest is more in coding this, check out how the module does it at https://github.com/civicrm/civicrm-drupal/blob/7.x-master/modules/civicrm_og_sync/civicrm_og_sync.module.