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.

Files: 
CommentFileSizeAuthor
#10 1873194-og-register-pending-10.patch8.36 KBAmitaibu
PASSED: [[SimpleTest]]: [MySQL] 780 pass(es).
[ View ]
#4 1873194-og-register-pending-4.patch4.47 KBAmitaibu
PASSED: [[SimpleTest]]: [MySQL] 745 pass(es).
[ View ]

Comments

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

Assigned:Unassigned» Amitaibu

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

Tagging

Status:Active» Needs review
StatusFileSize
new4.47 KB
PASSED: [[SimpleTest]]: [MySQL] 745 pass(es).
[ View ]

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.

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!

Have you patched it against the dev release?

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).

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.

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

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

StatusFileSize
new8.36 KB
PASSED: [[SimpleTest]]: [MySQL] 780 pass(es).
[ View ]

Added test.

Status:Needs review» Fixed

Committed.

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