I'm currently using og_reg_codes with og 5.x-7.3 and it appears to work fine. I'd be happy to assist with testing and maintenance with a view to making it available as a version 5 module.

Comments

pwolanin’s picture

great - did you need to make changes to get it to work with that version?

stevecowie’s picture

Really sorry not to have responded sooner - got side-tracked with holidays and other stuff. I did make a change at line 104, which I forgot to document for myself, but as far as i recall this was done so that when someone registered with this code they got automatically subscribed without triggering emails.

//$return = og_subscribe_user($gid, $account);
$return = og_save_subscription($gid, $account->uid, array('is_active' => 1));

Just found the documentation and this was done so that subscribers got automatically joined to the group rather than added to a moderation queue.

Apart from this change, og_reg_codes is working with og version 5.x-7.3

marcp’s picture

Assigned: Unassigned » marcp

@stevecowie - the change to line 104 that you made goes against the original design of this project -- see #120478: Code doesn't bypass moderation -- as Peter says there, "Make the group open if you don't care who joins."

I've been verifying that HEAD works fine with og-5.x-7.3 and am working to get an official 5.x release out the door soon.

marcp’s picture

Just to clarify -- without the change to line 104, if your group is "open" then the code gets you in immediately, but if your group is "moderated" you'll be added to the moderation queue which is by design.

marcp’s picture

Status: Active » Fixed

There's now an official 5.x-1.1 release.

marcp’s picture

Version: 5.x-5.x-dev » 5.x-1.1
stevecowie’s picture

The reason we did this was that group admins could provide the registration code for the group to a prospective member and that user could then register and join the group in a single step. This is being used in a setting where the groups are individual companies, so we wanted to streamline the process. However, I get your point - it's inherently insecure and is a hack rather than a recommendation.

marcp’s picture

Thanks for explaining. We have a completely separate implementation that I am struggling to release right now. Instead of having automatically generated codes, this other implementation allows the group owner to specify a code. The code works for any type of group, and the user can leave the code empty if they don't want to take advantage of this.

This other module will either be released as a separate branch of og_reg_codes or a completely separate project pretty soon. Would you be interested in testing it out?

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.