Hello,

I am trying to write a rule where new users will be subscribed to a specified group upon registration.

I found the triggers but I am not able to make head or tails of the group.

1. React on event: After saving a new user account
2. Conditions: None
3. Actions: Subcribe user to group

This is where it gets complicated:

User
Data selector: site:current-user

Group
Data selector: Here I do not understand any of the options offered under "Data Selectors"

All I want is to input the name of the OG (Website Development) but I can not find any option that will let me do that.

Where did I go wrong? Of is Rules simply not capable of doing what I want?

Regards,
Paul

Comments

paul_constantine’s picture

From the lack of responces I take it that it is not possible to automatically add new users to a default group.

Oh well.

paul_constantine’s picture

Status: Active » Closed (fixed)

Fixed it - this is how it works.

  1. Create an open group where your new users will be added automatically during registration.
  2. Enable OG sub module "Organic groups register".
  3. Add the "Add Group register field group types" to the "Open Group Node Entity" at "Home/Administration/Configuration/Organic groups/OG field setting/"
  4. Add the field "og_user_group_ref" to the registration form at "Home/Administration/Configuration/People/Account settings/"
  5. At "Home/Administration/Configuration/People/Account settings/Manage fields/og_user_group_ref/ check the fields "Required field" and "Display on user registration form".
  6. Configure as follows: number of values: unlimited. Target-type: node. Mode: organic groups. Target bundles: open group, private group (Important: all target bundles need to be marked or you get the error that was bugging me for so long).
  7. Check all your group-types and enable or disable the function "show on registration form".
  8. Update your database and clear the drupal cache.
  9. Try it out.
  10. Use css (display: none;) to optically remove the group registration from your user registration form if you so desire.