I am using drupal version 4.7.3 and the organic groups module. In addition to that I am using the og_mandatory_group module, so that every user that registers to the site will be added to the default group I have created for this purpose. I have also installed the og_promote module so that I can assign a default role to all members of a group. I currently have the configuration that follows :

1) I have created 3 groups (lets say group01, group02, group03 with group01 being the default group used by the og_mandatory_group module)
2) I have created some roles (lets say role01,role02,role03)
3) Using the og_promote module I said that the users who join group02 will be assigned the role role02.
4) When I register a new user to the site the user is added to the default group (group01) but without being added to group02 he gets the role for that group which I added to og_promote.

For testing purposes I disabled the og_mandatory_group so that when I add a new user to the site he will not be part of any group by default. The user is not assigned to any role now. When I add this user to group02 he gets the proper role, role02 assigned by me to members of group02(from og_promote). Therefore I think (If I got this the right way) that when using the og_mandatory_group there is some kind of confusion with the og_promote module.

Any suggestions on this will trully be appreciated.
Thank you

CommentFileSizeAuthor
#4 og_promote_0.patch510 bytesdarren oh
#2 out.patch2.85 KBbwynants

Comments

bwynants’s picture

I have just og_promote. When a user subscribes from the user/register panel it look ok, the role I assigned is only assigned after permission is granted for the group

However is the user decides not to join any group it is also assigned the role.

disabled og_promote for now...

bwynants’s picture

Status: Active » Needs review
StatusFileSize
new2.85 KB

My problem is solved with the enclosed patch, maybe yours as wel?

patch seems large but in fact it only adds an addition check to see if $nid is a valid id

I found that og_promote_og was also called when a user creates an account but does not subscribe to any group. og_promote_og was called with nid == 0 and is_active == 1

darren oh’s picture

Status: Needs review » Needs work

In my case, this happens when I have both og_roles and og_promote enabled. This patch doesn't fix the problem.

darren oh’s picture

Status: Needs work » Needs review
StatusFileSize
new510 bytes

Here's a patch that works for me. The problem was that og_promote_og would check to see if a role had been set up for users to be promoted to, but it wouldn't check to see if the group was supposed to promote users to that role.

darren oh’s picture

Assigned: Unassigned » darren oh
Status: Needs review » Fixed

Fixed in CVS commit 46285.

Anonymous’s picture

Status: Fixed » Closed (fixed)