Hi - thank You for a great and useful module.

However the current Organic Groups module for Registration Code was flexible but was too demanding for our website administrators.
Because of this I created this simple module for an easier Organic Groups integration.

Using this module You are able to select a group when creating a new registration code. When this registration code is used the user will be assigned to this group. Not as flexible as the current module - but great for our needs and much simpler.

I'm posting it here, as others might have the same needs.

In order for this module to work right now the Bulk creation of codes have been disabled. In order to fix this a API hook for whenever a code have been created is needed. I'm going to create a seperate feature request for this #2023107: API Hook for whenever a new code is created.

CommentFileSizeAuthor
regcode_og_simple.zip2.84 KBMorten Najbjerg

Comments

andrea.brogi’s picture

Hi,
I have installed your simple module and is working correctly. Great work.
But I would like to know how to add the OG group Title in the Managing List (the first tab).
Thanks.

Morten Najbjerg’s picture

Hi Andrea.
Glad to hear You like it.
The group title on the dashboard would make a great addition...
The dashboard is really just a view, so perhaps You might be able to do it using the Views PHP module, and doing something like:

$settings = variable_get('regcode_og_simple_settings', array());
$nid = $settings[--INSERT THE REGCODE HERE--];
$node = node_load($nid);
echo $node->title;

...this is not tested however.
A better way would of course be to create a views plugin that reveals the group relation in views based on the Registration Code.
If others are interested in this addition to Registration Code I could perhaps look into releasing it as a separate module and create the Views functionality as well... but it depends on this issue as well https://drupal.org/node/2023107

Morten Najbjerg’s picture

Issue summary: View changes

Added link to other issue

Yuri’s picture

Issue summary: View changes

This is a great little module, but I have one request: Currently it allows to select one group. Could this be made so that multiple groups are assigned with the code?

matt b’s picture

This is a great little module thanks - I'm needing registration codes with the domain access module and started writing my own module. I came across this and looks like I've come up with the same way to solve the issue but for domains - alter the Create Code form and disable the bulk code creation!

lias’s picture

@Morten Najbjerg - are there plans to create a project page for your module? I'm also wondering if you will be updating it to 8 when that is released?

clemens.tolboom’s picture

Issue summary: View changes
held69’s picture

Version: 7.x-1.0 » 7.x-1.x-dev

thanks for your module!

Is there any way to create more than one code at a time?

(to make use of the bulk creation)

tr’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Assigned: Morten Najbjerg » Unassigned
Status: Needs review » Needs work

There is no patch here ...

tr’s picture

Status: Needs work » Closed (outdated)