drupalfun.com
relationship between user id and profile id
Submitted by adam clarey on Fri, 05/01/2009 - 15:13
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
Related Questions
Responses
2. Yes, but this depends on the
Submitted by dorien on Sun, 05/03/2009 - 10:43.
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
Submitted by adam clarey on Sun, 05/03/2009 - 15:31.
ok, this method would be more robust.
Thanks


1. one solution iv found
return "content/{$user->name}";