I want to fill in the defaults on a CCK field with simple things like the user's name and contents of their profile. I'm finding the documentation hard to follow, not the first time.
I've installed the token module which seems to be what's required and it has a token_cck.inc file which seems to imply that's all you need for cck. But if I try putting:
return array(0 => array('value' => token_replace("[name]")));
in the php code box, it doesn't work. I just get [name] appearing as the default. Can someone clue me in where to go? I've already tried $user->name and the like and they don't seem to be available.
If you can answer that, maybe you can also go the next stage on profiles. I could write the code directly but I'd like my (non php programmer) team to be able to do it too.
Chris