Any plans for a D7 port of this module?

Comments

jlea9378’s picture

I would also be interested in a drupal 7 version.

liberatr’s picture

I have reproduced the basic functionality using the Rules module. Here is the export, which you should be able to import into your site with little consequence.

{ "rules_mandatory_group" : {
    "LABEL" : "Mandatory Group",
    "PLUGIN" : "reaction rule",
    "TAGS" : [ "proctors" ],
    "REQUIRES" : [ "og", "rules" ],
    "ON" : [ "user_presave" ],
    "IF" : [
      { "NOT og_user_in_group" : {
          "account" : [ "account" ],
          "group" : "9",
          "states" : { "value" : { "1" : "1" } }
        }
      }
    ],
    "DO" : [ { "og_subcribe_user" : { "user" : [ "account" ], "group" : "9" } } ]
  }
}
JohnnyX’s picture

Also searching for a "default group membership" solution. Following here...

playfulwolf’s picture

+1 from me

are there any alpha code?
or is it somehow possible to do with rules or similar module?

playfulwolf’s picture

@liberatr : I have imported your rule (OG 7.2), but it shows error

    Warning: call_user_func() expects parameter 1 to be a valid callback, class 'RulesDataUI' does not have a method 'render' in RulesPluginUI->buildContent() (line 714 of /data/disk/o1/distro/004/drupal-7.14.2-prod/sites/all/modules/rules/ui/ui.core.inc).
    Warning: call_user_func() expects parameter 1 to be a valid callback, class 'RulesDataUI' does not have a method 'render' in RulesPluginUI->buildContent() (line 714 of /data/disk/o1/distro/004/drupal-7.14.2-prod/sites/all/modules/rules/ui/ui.core.inc).

And I do not see any ways to add mandatory group node id

Drupa1ish’s picture

Another approach with dataset instead of og_subcribe_user

{ "rules_mandatory_group" : {
"LABEL" : "Mandatory Group",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules" ],
"ON" : [ "user_presave" ],
"DO" : [
{ "data_set" : { "data" : [ "account:og-user-node" ], "value" : { "value" : [ "77" ] } } }
]
}
}
legovaer’s picture

I will try to port this module to D7.