My Profile link seems off
I wanted to do the text link as demonstrated in 4.4.2 (pg50) of the Drupal Fun book. I put the following PHP into a block:
$myuid = $user->uid;
$node = content_profile_load(profile, $myuid);
//profile above = the name of our content type
$profileid = $node->nid;
print l('My profile','node/'.$profileid);
//l() is a function provided by Drupal that creates a link.
//l(link display text, path after main path)
What I expect to happen is if I am on "Chris's" account page, I'd expect that block to take me to Chris's profile. Unfortunately, what the link points to instead is my own profile (or whatever user I'm logged in as at that time). Did I screw something up in the php or are my expectations off?