Change value of user reference based on node reference
If what you are asking is can you change the user reference field to something based upon a node reference field, sure, not a problem.  But what do you want to change it to?  If it's the user id of the creator of the node referenced, that's easy:

// load node in question
$node=node_load($nid); 
// load node referenced in that node
$node_referenced=node_load($node-&gt;field_node_reference[$node-&gt;language][0]['nid']);
// set user referenced in node to the uid of the node referenced in it
$node-&gt;field_user_reference[$node-&gt;language][0]['uid']=$node_referenced-&gt;uid;
// save the node
node_save($node);


If you want to do this automagically, you can look at hook_node_presave() and have this done every time a node type is saved.