What variable will let me access user profile info? I'm using prepopulate to prepopulate a feild of a node/add/content. I'm trying to generate a URL using some PHP code that willl generate a URL like:

http://mysite.com/node/add/content_type?edit[title]={$some_var}


Each of my user profiles will have this link at the top of the page and I would like $some_var to hold the username of the user whos profile we are currently viewing. I was wonder how to populate $some_var with the username of the user profile being viewed.

Something like:

$some_var = $username;
print("&lt;a href=\"http://mysite.com/node/add/content_type?edit[title]={$some_var}\"&gt;Content Type&lt;/a&gt;");
If this link is to be on the user profile page then you can grab the related user ID from the internal URL (using the arg() function), and then use user_load() to load a user object that contains the username:

// Get user ID from internal router path (this isn't necessarily the URL shown in the address bar, it's the internal path that Drupal is using to serve the page).
$uid = arg(1);

// Load the user account and extract the username
$account = user_load($uid);
$username = $account-&gt;name;