I'm trying to use Rules to populate a CCK field - a user reference when they flag a node. It basically works, but if there's already a user reference it overwrites it instead of adding another. That's not exactly what I want. I want the rule to add another user reference field to whichever ones are already there, then populate it with the user reference.
Do you have any idea?
Edit - What I eventually came up with, without Rules -
function bamfmodule_flag($action, $flag, $content_id, $account) {
if($action == 'flag') {
if ($flag->name == 'event_bookmark') {
$node = node_load($content_id);
array_push($node->field_trainer, $account->uid);
node_save($node);
}
}
}