As of version 2.8, OGUR allows you to create registration codes to be used to subscribe to groups.

Some basic rules:

  • Registration codes can be used by users to subscribe to groups in *any* status: Open, closed, invite only and/or moderated.
  • There is a global setting (in OGUR Settings: http://drupal.org/node/163567) to turn on registration code usage, but it is in the individual groups where group admins actually determine if a) the group will use registration codes and; b) what those codes will be.
  • A single registration code can only be used to subscribe to only one group.
  • Every registration code must be unique. It can NOT be duplicated in any other group.
  • "Anonymous" users can see the "Enter registration code" tab on the Groups listing page, but cannot enter registration codes here. Only valid users who are logged in, i.e. "authenticated", can enter registration codes on this page. Anonymous users can only use registration codes, if allowed, as part of the initial account signup process.

The process for using registration codes:

  1. In OGUR settings (http://drupal.org/node/163567) click on Allow Group Admins to define Registration Codes for new group subscribers to moderated groups option. This will create a new Registration code for new subscribers to this group setting in all groups.
  2. In Access Control, you must give the use registration codes permission to all roles whose users will be able to use registration codes to subscribe to groups. If you want anonymous users to be able to enter registration codes on signup, then you must give the anonymous role this permission.
  3. In Access Control, you must give the manage registration codes permission to all roles whose users will be able to determine if a group can use registration codes, and if so, will be able to enter the codes for a group. Note that these users will also need to have the "edit group content" permission as they will need to edit the group node to check on the Set registration codes to allow users to join this group? option.
  4. On the "Edit Group" page, a new Registration code for new subscribers to this group fieldset will appear. The group admin (user with the "manage registration codes" permission) will be able to edit the following options in this fieldset:
    • Set registration codes to allow users to join this group? If you want to use registration codes for subscription to this group, click this on. If you do NOT check this on, then none of the other options in this fieldset will be valid.
    • Delete registration code after it is used? If you want each registration code to be deleted immediately after it is used, then click this on.
    • Registration codes for allowing users to subscribe to this group without admin approval:Enter the list of registration codes to be used to automatically subscribe to this group without moderation. The codes themselves should contain no punctuation and no spaces. Each code must be separated by a comma ",". Again no spaces between the comma and code. Remember that every registration code entered must be unique to your site; that it, it can not be duplicated in any other group.
    • Set default basic group (group limited) role for users who join this group using this registration code? If you wish to assign a specific group role to users who subscribe to this group using one of the registration codes above, then click this option on.
    • Role to assign: If you clicked the above option on, select the role which you wish to assign to users who subscribe to this group using a registration code entered above. User must have the auto assign group roles permission in order to assign a registration code group role.
  5. If registration codes are turned on for this group, a "Enter registration code" tab will now be viewable on the "Groups" (/og) list to users who have the "use registration codes" permission. When a valid user clicks on this tab, the user will see a text box titled Group registration code: which will allow that user to enter a registration code to join a group, if the user has been given one. Anonymous users will not see this option as they are not allowed to enter registration codes here. When a user enters a valid registration code, the user will see a message that he or she has been subscribed to the group for which the registration code was created, and there will also be a link to go directly to this group.
  6. If registration codes are turned on for this group, and "anonymous" users are given the "use registration codes" permission, and this group is configured to be listed on the registration page, then new users signing up to your site will see a box in the "Groups" fieldset to enter a Group registration code.
  7. There is now a "Register Codes" block available in Admin->Site Building->Blocks. Place this block where you want the "Enter registration code" link to appear on the group home page.

Notes on using Registration Codes with OG Group Friend Invite: http://drupal.org/node/255046#comment-838241