Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I do not now how to get on and I tried several ways: After a user flagged a content I want the flagging user to be filled in in the user reference field of the node. As there is no way to use tokens in the action definition area as there is just a field from which you can sellect a user I tried to get it with PHP. But nothing worked:
return array($flagging_user);
return array(
0 => array('uid' => $flagging_user)
);
return array('uid' => $flagging_user);
As you may see I am still not very familiar with PHP - could you please help me to get this work?
Greez,
Tobias
Comments
Comment #1
tobiberlinok, now I found the right way:
Comment #3
j4 CreditAttribution: j4 commentedHi tobiberlin, how exactly did you use this? and where in the rules action? I have a very similar situation where i need to add the flagged user uids to the user reference field of a node created by the flagging user of a particular content type. Can you help me with this?
Thanks
Jaya