Prerequisite: the permission "Subscribe to group" setting for a group is setted to
"Allow non-members to request membership to a group (approval required)".

In case of a not yet registered user chooses a group on the website registration form then, after form submission, user is immediately added to that group even if that group needs a membership approval.

User state is automatically set to "active" instead of "pending" bypassing the subscription request and approval from group administrator.

Expected result:
After user submits website form registration, 2 actions were expected:

  1. The default drupal website registration process goes ahead
  2. The "Are you sure you want to join the group XXX" page have to be shown to the user as well as the "request message" input textarea and final "join" button.

Thank you very much for working on this bug.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MXT’s picture

I think this bug should be considered as a final release blocker because introduces a big architectural inconsistency.

amitaibu’s picture

Assigned: Unassigned » amitaibu

Yeah, it's a hard one. Assigning yo myself unless someone else is going to work on it.

amitaibu’s picture

Issue tags: +OG 2.x release blocker

Tagging

amitaibu’s picture

Status: Active » Needs review
FileSize
4.47 KB

Patch allows OG-register to pass the correct membership state via the field values.
Note that we will not deal with showing pending messages/ subscription pages, as there might be multiple groups being selected on registration. If you want something more sophisticated to happen, patches are welcome..

Still needs tests.

MXT’s picture

TESTED:

Trying to register a new user and subscribing to a group: (where approval is required):

1) When I go to /user/register I receive the following warning:

Warning: Invalid argument supplied for foreach() in og_field_widget_form() (line 69 of /var/www/mysite/sites/all/modules/contrib/og/includes/og.field.inc).

2) After submitting registration form I receive the above warning again

3) Final result: new user STATE is correctly setted to 'pending'

Thank you very much!

amitaibu’s picture

Have you patched it against the dev release?

MXT’s picture

yes, I always download latest dev before applying patch

I don't know if this is usefull: cardinality is setted to 1 for my users (they can subscribe to only one group), indeed I have a select in form registration form (not a multivalue select).

amitaibu’s picture

1) When I go to /user/register I receive the following warning:

Warning: Invalid argument supplied for foreach() in og_field_widget_form() (line 69 of /var/www/mysite/sites/all/modules/contrib/og/includes/og.field.inc).

Probably your ER-prepopulate is not updated to latest dev.

MXT’s picture

Probably your ER-prepopulate is not updated to latest dev.

You are right: after upgrading the warning does not appear anymore.

amitaibu’s picture

Added test.

amitaibu’s picture

Status: Needs review » Fixed

Committed.

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

held69’s picture

Issue summary: View changes
Status: Closed (fixed) » Active

I see that the patch is committed however still having this behaviour with
7.x-2.4+9-dev

Under admin/config/group/permissions/mygroupnode
permissions are set to "Subscribe to group
Allow non-members to request membership to a group (approval required)."

As non member i can apply for membership on registration page.
Member becomes active at once, skipping the pending state.

  • amitaibu committed 586b987 on 8.x-1.x
    Issue #1873194 by Amitaibu | MXT: Fixed 'approval required' subscription...