[英]How to programmatically add newly created node to a group in the Drupal Group Module?
I am creating a management website.我正在创建一个管理网站。 Super admin can create users.超级管理员可以创建用户。 Users can create nodes.用户可以创建节点。 I need to know how to add that newly created nodes to the groups that users are in.我需要知道如何将新创建的节点添加到用户所在的组中。
The group that you want to say is called roles in Drupal.您要说的组在 Drupal 中称为角色。
For example: When a user creates a node, this user has a role "editor".例如:当用户创建节点时,该用户具有“编辑者”角色。 Then, the node was created by editor然后,该节点由编辑器创建
Now, if you want to show the role in the content view, you have to edit the view.现在,如果要在内容视图中显示角色,则必须编辑该视图。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.