i have a cck custom type that is created by people and the fields are filled. Then someone else edit those nodes and adds more data. I want to save the username of the user editing the content into an hidden field.
i know i can get the user with this:
global $user;
$a = $user->name;
return array(
0 => array('value' => $a)
);
and i have put this as default code for the hidden field, but the field now is filled with the creator of the node, and then is not replaced with the editor. How can i solve my issue?