Drupal 7 开发内部培训资料, 分头诗人

rules模块如何将用户添加到多个群组中?

赞成!
0
否决!

https://www.drupal.org/node/2305815 按照这个方法,用rules模块,在用户登录时将用户添加到某个群组中,但这里是在添加 action时,添加了一个变量即node id 为71的群组,我想要同时添加到多个群组中,即需要指定多个node id ,如何设置rules模块???

3 个回答

赞成!
0
否决!

给你一个用户注册时候,添加到og的rules

  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.
赞成!
0
否决!

谢谢你的回答,这个方法很详细,可以在注册时加入群组。但我需要的是rules模块的多变量问题,rules模块可以结合角色,积分,让用户加入不同的群组

赞成!
0
否决!

谢谢你的回答,这个方法很详细,可以在注册时加入群组。但我需要的是rules模块的多变量问题,rules模块可以结合角色,积分,让用户加入不同的群组