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

tobiberlin’s picture

Status: Active » Fixed

ok, now I found the right way:

return array(0 => array('uid' => $flagging_user->uid));

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

j4’s picture

Hi 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