I am trying to integrate this module with login destination. Basically what I want to do is use a code snippet in the login destination module admin. This snippet needs to return the path for adding a profile node for the logged in user if a profile node does not already exist.
What I need is some idea of how to detect if a content profile node exists for the user that has just logged in.
any ideas/tips for how to get this information?
Thanks
Comments
Comment #1
rjbrown99 commentedHere's a block that works for me.
global $user;
$node = content_profile_load('profile', $user->uid);
if (empty($node)) {
return 'node/add/profile';
} else {
return 'node';
}
My profile content type is 'profile' as you can see in the second line.
Comment #2
ressaThanks rjbrown99, I used your example in my lengthy Login Destination snippet. The profile content types are 'customer_unit' and 'partner'.