relationship between user id and profile id

Status: 
Solved
Question: 

Im using the login destination module so that when a user logs in they get redirected straight to their profile page.

the snippet im using is:

global $user;

return "node/{$user->uid}";

but this is incorrect as the user id does not equal their profile id. Is thier a parameter in $user which will always relate to their profile page?

thanks

Responses

1. one solution iv found

return "content/{$user->name}";

2. Yes, but this depends on the

Yes, but this depends on the auto urls.

use the function:


global $user;
$node = content_profile_load(profile, $user->uid);
$path = 'node/'.$node->nid;
return $path;

Something like this should work.

3. thanks

ok, this method would be more robust.

Thanks